Re: [PATCH 21/22] sequencer: left-trim the lines read from the script
- From
Jakub Narębski <jnareb@gmail.com>
- Date
- Sep 1, 2016, 10:50 UTC
- Message-ID
- <7996a963-52b5-5f3c-f686-f5cf22573573@gmail.com>
- In-Reply-To
- <8c30113a920e075e5ecd68ba31b4007de3e2dbc2.1472457609.git.johannes.schindelin@gmx.de>
Hello Johannes,
W dniu 29.08.2016 o 10:06, Johannes Schindelin pisze:
Subject: [PATCH 21/22] sequencer: left-trim the lines read from the script
In the subject, it should probably be without "the", as "lines" are plural.
s/left-trim the lines/left-trim lines/
> Interactive rebase's scripts may be indented; We need to handle this > case, too, now that we prepare the sequencer to process interactive > rebases.
s/; We need/; we need/
Nice little bit of scaffolding for sequencer-izing rebase -i.
Show 5 quoted lines
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> > --- > sequencer.c | 3 +++ > 1 file changed, 3 insertions(+)
Small change, easy to review.
Show 12 quoted lines
> > diff --git a/sequencer.c b/sequencer.c > index 0614b90..5efed2e 100644 > --- a/sequencer.c > +++ b/sequencer.c > @@ -864,6 +864,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"); > +
Nice. Thanks for the comment. "left-trim" is better than "de-indent".
'bol' is beginning-of-line, isn't it (a complement to eol)?
> for (i = 0; i < ARRAY_SIZE(todo_command_strings); i++)
> if (skip_prefix(bol, todo_command_strings[i], &bol)) {
> item->command = i;
> -- Jakub Narębski