Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sequencer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2100,7 +2100,7 @@ static int parse_insn_line(struct repository *r, struct todo_item *item,
if (skip_prefix(bol, todo_command_info[i].str, &bol)) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Junio C Hamano wrote (reply to this):

"Phillip Wood via GitGitGadget" <[email protected]> writes:

> From: Phillip Wood <[email protected]>
>
> The code that parses the todo list allows an unabbreviated command name
> to be followed by a space or a tab, but if the command name is
> abbreviated it only allows a space after it. Fix this inconsistency.

Makes sense.

>
> Signed-off-by: Phillip Wood <[email protected]>
> ---
>  sequencer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sequencer.c b/sequencer.c
> index f88a97fb10..919e3153f5 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -2100,7 +2100,7 @@ static int parse_insn_line(struct repository *r, struct todo_item *item,
>  		if (skip_prefix(bol, todo_command_info[i].str, &bol)) {
>  			item->command = i;
>  			break;
> -		} else if ((bol + 1 == eol || bol[1] == ' ') &&
> +		} else if ((bol + 1 == eol || bol[1] == ' ' || bol[1] == '\t') &&
>  			   *bol == todo_command_info[i].c) {
>  			bol++;
>  			item->command = i;

item->command = i;
break;
} else if ((bol + 1 == eol || bol[1] == ' ') &&
} else if ((bol + 1 == eol || bol[1] == ' ' || bol[1] == '\t') &&
*bol == todo_command_info[i].c) {
bol++;
item->command = i;
Expand Down