Skip to content

Commit 8f8550b

Browse files
dschogitster
authored andcommitted
sequencer: left-trim lines read from the script
Interactive rebase's scripts may be indented; we need to handle this case, too, now that we prepare the sequencer to process interactive rebases. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0009426 commit 8f8550b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sequencer.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,9 @@ static int parse_insn_line(struct todo_item *item, const char *bol, char *eol)
874874
char *end_of_object_name;
875875
int i, saved, status, padding;
876876

877+
/* left-trim */
878+
bol += strspn(bol, " \t");
879+
877880
for (i = 0; i < ARRAY_SIZE(todo_command_strings); i++)
878881
if (skip_prefix(bol, todo_command_strings[i], &bol)) {
879882
item->command = i;

0 commit comments

Comments
 (0)