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

Commit ending in \ breaks rebase commitlog parsing

From
JJJoshua ben Jore <twists@gmail.com>
Date
Jul 5, 2010, 20:24 UTC
Message-ID
<AANLkTim8BGaTvaBFdNDeQp26hwMCztScZFoIHI00DjkD@mail.gmail.com>

Hi, Through typos on my part, I have a commit with a message ending in a \.

    Prefer ! and && to \\not\ and 'and\

The rebase command or something it is using is parsing this incorrectly and leaving my .git in a "bad" state.

    pick 43d2369 Prefer ! and && to
    ot and 'and8c7ee99 Upgrade to Devel::PPPort-3.19
That should have read:
    pick 43d2369 Perefer ! and && to \\not\ and 'and\
    pick 8c7ee99 Upgrade to Devel::PPPort-3.19

Initially, I started editing my pick list to be proper and was receiving some strange sort of parsing errors but now am not. I'd manually edited the backup picklist file in .git as well. For a repro, I tried the following. This also seems to show up a perhaps related problem of a commit message consisting of only a single backslash. The pick list just *drops* the commit, perhaps because some layer thinks the commit message is empty?

    mkdir slash
    cd slash
    git init
    echo data1 > foo
    git add foo
    git commit -m root
    export PARENT=$(git rev-parse HEAD)
    echo data2 > foo
    git add foo
    git commit -m \\
    echo data3 > foo
    git add foo
    git commit -m next
    git rebase -i $PARENT
    # .git/rebase-merge/git-rebase-todo is now incorrect
Josh
Next: Junio C Hamano
Message 1 of 2 in “Commit ending in \ breaks rebase commitlog parsing”
  1. Joshua ben JoreJul 5, 2010
  2. Junio C HamanoJul 6, 2010

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.