git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Matthieu MoyNext: Matthieu Moy
Message 8 of 13 in “rebase: accept indented comments (fixes regression)”
  1. rebase: accept indented comments (fixes regression)Matthieu Moy, Sep 30, 2015
  2. Remi Galan AlfonsoSep 30, 2015
  3. Junio C HamanoSep 30, 2015
  4. Matthieu MoySep 30, 2015
  5. Junio C HamanoSep 30, 2015
  6. Junio C HamanoSep 30, 2015
  7. Matthieu MoySep 30, 2015
  8. Junio C HamanoSep 30, 2015
  9. 1/2 rebase-i: explicitly accept tab as separator in commandsMatthieu Moy, Oct 1, 2015
  10. 2/2 rebase-i: loosen over-eager check_bad_cmd checkMatthieu Moy, Oct 1, 2015
  11. rebase-i: loosen over-eager check_bad_cmd checkMatthieu Moy, Sep 30, 2015
  12. Eric SunshineSep 30, 2015
  13. rebase-i: loosen over-eager check_bad_cmd checkMatthieu Moy, Sep 30, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.