From: Johannes Schindelin Date: Fri, 21 Oct 2016 12:25:36 +0000 (+0200) Subject: sequencer: left-trim lines read from the script X-Git-Tag: v2.11.0-rc0~17^2~9 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=8f8550b3ece8742c75dc6a5296d1b82e52e09def;p=git-core%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/sequencer.c b/sequencer.c index 8646ca56f..d74fdce99 100644 --- a/sequencer.c +++ b/sequencer.c @@ -874,6 +874,9 @@ static int parse_insn_line(struct todo_item *item, const char *bol, char *eol) char *end_of_object_name; int i, saved, status, padding; + /* left-trim */ + bol += strspn(bol, " \t"); + for (i = 0; i < ARRAY_SIZE(todo_command_strings); i++) if (skip_prefix(bol, todo_command_strings[i], &bol)) { item->command = i;