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

Re: [PATCH] git-rebase--interactive: Handle commit messages that end in backslash

From
Jeff King <peff@peff.net>
Date
May 13, 2010, 14:33 UTC
Message-ID
<20100513143350.GA2742@sigill.intra.peff.net>
In-Reply-To
<20100513135807.548594f9@bobcat.office>
On Thu, May 13, 2010 at 01:58:07PM +0100, Chris Lamb wrote:
> Disregard the patch; it has some funky side-effect which breaks ONTO
> parsing and I don't know why.
>
> (The problem still exists though.)
Hmm. It looks like there is more weirdness, too. Try
  git commit -m 'magic \\n newline'

I get a stray newline in the git-rebase-todo file. IIRC, we had this problem before because some shells' "echo" will interpret, and some will not (I think bash will not, but dash will). So there are a few "echo" calls that need to be "printf %s" in git-rebase--interactive.

But I wonder if we would do better to simply sanitize the subject line of metacharacters. As I understand it[1], the subject line shown is for human consumption only, and the actual operations happen on the included sha1. So we could munge it in a non-reversible way without breaking anything.

-Peff

[1] I may be wrong. This is not code I'm too familiar with, and I do remember a proposal at some point for automagically handling subjects with "wip" or "squash" in them. Still, a light munging may work.

Previous: Chris LambNext: Thomas Rast
Message 3 of 4 in “git-rebase--interactive: Handle commit messages that end in backslash”
  1. git-rebase--interactive: Handle commit messages that end in backslashChris Lamb, May 13, 2010
  2. Chris LambMay 13, 2010
  3. Jeff KingMay 13, 2010
  4. Thomas RastMay 14, 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.