summaryrefslogtreecommitdiff
path: root/mem-pool.c
diff options
context:
space:
mode:
authorLibravatar Phillip Wood <phillip.wood@dunelm.org.uk>2019-06-27 07:12:45 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-06-27 10:31:01 -0700
commit3e81bccdf3ceab531e95ba3846083dbc8ba0e319 (patch)
tree05a4d9947487c880f26a2200791ca45deaddceb4 /mem-pool.c
parentsequencer: always allow tab after command name (diff)
downloadtgif-3e81bccdf3ceab531e95ba3846083dbc8ba0e319.tar.xz
sequencer: factor out todo command name parsing
Factor out the code that parses the name of the command at the start of each line in the todo file into its own function so that it can be used in the next commit. As I don't want to burden other callers with having to pass in a pointer to the end of the line the test for an abbreviated command is changed. This change should not affect the behavior. Instead of testing `eol == bol + 1` the new code checks for the end of the line by testing for '\n', '\r' or '\0' following the abbreviated name. To avoid reading past the end of an empty string it also checks that there is actually a single character abbreviation before testing if it matches. This prevents it from matching '\0' as the abbreviated name and then trying to read another character. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'mem-pool.c')
0 files changed, 0 insertions, 0 deletions