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

Re: 2.6.0: Comment in rebase instruction has become too rigid

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Sep 29, 2015, 15:05 UTC
Message-ID
<vpqr3lhb719.fsf@grenoble-inp.fr>
In-Reply-To
<CAEY4ZpN0C96jU4Tgvqt-hWEviR-sapDoyAv88H+opPSr-cs=mg@mail.gmail.com>
Nazri Ramliy <ayiehere@gmail.com> writes:
Show 11 quoted lines
> I'd hit that key in my editor that filters the pick instructions add
> inserts the list of the modified files in each commit so that the
> instruction sheet becomes like this:
>
>   pick deadbeef some commit message
>      # M path/to/foo.txt | 15 ++++----------
>   pick cafebabe another commit message
>      # M bar.txt | 2 +-
>
>
> IIRC before git 2.6.0 this worked fine.
Confirmed: Git 2.1.4 accepts this, 2.6 doesn't:
Warning: the command isn't recognized in the following line:
 - # pick dbafac11052a0075233bdcf0b71f54d1503aa82d test

You can fix this with 'git rebase --edit-todo'. Or you can abort the rebase with 'git rebase --abort'.

I didn't bisect, but I guess this was introduced in the series introducing this check on the todolist before starting the bisection.

Actually, I think we accepted indented comments by mistake: the semantics of comments in Git is usually that it must start at the first column (try an indented # in a commit buffer, it's not a comment). But since Git accepted it in the past, we should continue accepting it to avoid breaking the user experience.

No time to send a patch right now, but I will hopefully be able to do this within the next few days. It should be essentially a s/^ *// before calling stripspaces.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Nazri RamliyNext: Matthieu Moy
Message 2 of 6 in “2.6.0: Comment in rebase instruction has become too rigid”
  1. Nazri RamliySep 29, 2015
  2. Matthieu MoySep 29, 2015
  3. Matthieu MoySep 29, 2015
  4. Junio C HamanoSep 29, 2015
  5. Junio C HamanoSep 29, 2015
  6. Ralf ThielowSep 29, 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.