From: Junio C Hamano Date: Sun, 11 Sep 2016 23:39:43 GMT Subject: Re: [PATCH v2 20/25] sequencer: left-trim lines read from the script Message-ID: In-Reply-To: <09e05e7ac23164625f2076ff06d2b034101878da.1473590966.git.johannes.schindelin@gmx.de> Johannes Schindelin writes: > Interactive rebase's scripts may be indented; we need to handle this > case, too, now that we prepare the sequencer to process interactive > rebases. Hmph, have we ever given the sequencer instructions indented to the user to edit? I do not offhand see why we want to be lenient here, especially only to the left. > > Signed-off-by: Johannes Schindelin > --- > sequencer.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/sequencer.c b/sequencer.c > index 7953a05..5e5d113 100644 > --- a/sequencer.c > +++ b/sequencer.c > @@ -875,6 +875,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;