Re: [PATCH v4 08/25] sequencer: completely revamp the "todo" script parsing
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 18, 2016, 12:25 UTC
- Message-ID
- <alpine.DEB.2.20.1610181425440.197091@virtualbox>
- In-Reply-To
- <xmqqfunusj1d.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On Mon, 17 Oct 2016, Junio C Hamano wrote:
Show 17 quoted lines
> Johannes Schindelin <johannes.schindelin@gmx.de> writes:
>
> > - for (i = 1; *p; i++) {
> > + for (i = 1; *p; i++, p = next_p) {
> > char *eol = strchrnul(p, '\n');
> > - commit = parse_insn_line(p, eol, opts);
> > - if (!commit)
> > - return error(_("Could not parse line %d."), i);
> > - next = commit_list_append(commit, next);
> > - p = *eol ? eol + 1 : eol;
> > +
> > + next_p = *eol ? eol + 1 /* strip LF */ : eol;
>
> This one was explained as "skip LF" in the previous round, and that
> is more correct than "strip", I think. The +1 here is not done to
> "strip" the LF out of the end result, but to "skip" one to move to
> the beginning of the next line.Changed, Dscho