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

Re: Bug: git-rebase goofs up \n in commit messages

From
Jeff King <peff@peff.net>
Date
May 26, 2007, 06:27 UTC
Message-ID
<20070526062748.GA21229@coredump.intra.peff.net>
In-Reply-To
<20070526061942.GA5986@gondor.apana.org.au>
On Sat, May 26, 2007 at 04:19:42PM +1000, Herbert Xu wrote:
Show 7 quoted lines
> > Is "\n" portable to all shells (i.e., do you need '\n')? It works with
> > bash and dash, which are by far the most common, but who knows what evil
> > lurks in the heart of Sun?
> 
> You mean the "\n" in printf? Yes that is specified in POSIX.
> Without the "\n" printf will act like echo -n (which incidentally
> is forbidden by POSIX).

No, I meant would the shell, while interpolating a double-quoted string "\n", always preserve the string and pass the backslash and 'n' to printf? Clearly \\ and \" get interpolated, but I don't know the rules for "unrecognized" backslash sequences.

-Peff
Previous: Herbert XuNext: Herbert Xu
Message 10 of 13 in “Bug: git-rebase goofs up \n in commit messages”
  1. Szekeres IstvanMay 25, 2007
  2. Jeff KingMay 26, 2007
  3. Herbert XuMay 26, 2007
  4. Jeff KingMay 26, 2007
  5. Junio C HamanoMay 26, 2007
  6. Junio C HamanoMay 26, 2007
  7. Jeff KingMay 26, 2007
  8. Junio C HamanoMay 26, 2007
  9. Herbert XuMay 26, 2007
  10. Jeff KingMay 26, 2007
  11. Herbert XuMay 26, 2007
  12. Jeff KingMay 26, 2007
  13. Junio C HamanoMay 26, 2007

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.