Re: [PATCH] rebase: accept indented comments (fixes regression)
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 30, 2015, 20:34 UTC
- Message-ID
- <xmqq8u7n7ikl.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <vpqh9mbhek2.fsf@grenoble-inp.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 7 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> + pick|p|drop|d|reword|r|edit|e|squash|s|fixup|f)
>> + if ! check_commit_sha "${rest%% *}" "$lineno" "$1"
>
> This does not pass my "tabs" test, as it parses the sha1 out of the line
> assuming it's separated with a space.Yes, it was very much deliberate to match what transform_todo_ids does.
I do not think we mind loosening this SP to SP/HT at all, but if we are going to go in that direction, I'd very much more prefer to do
"${rest%%[ ]*}"here _and_ in transform_todo_ids so that we can keep the identical parsing, which is the primary point of the "regression fix", rather than doing this:
Show 5 quoted lines
> I changed it to > > while read -r command sha1 rest > > which is a bit more lazy.
which is to invite the two parsers drift apart over time.
Thanks.