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

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

From
Junio C Hamano <junkio@cox.net>
Date
May 26, 2007, 06:13 UTC
Message-ID
<7v3b1knmda.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20070526060748.GA20715@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 20 quoted lines
> On Fri, May 25, 2007 at 09:59:43PM -0700, Junio C Hamano wrote:
>
>>  * I suspect we would declare either "war on echo" or "harder push
>>    for builtins" triggered by these.
>
> Cry havoc! More fixes below (just a diff -- maybe we want to aggregate
> these into a single commit?).
>
> These are the ones I noticed that use commit messages (which are
> probably the most likely to use backslash). There are _tons_ of uses for
> heads and filenames. I think we either should stop with commit messages,
> or go all-out and simply remove all uses of echo (because there are
> literally hundreds otherwise).
>
>> -		echo "$commit_only" |
>> +		printf "%s\n" "$commit_only" |
>
> 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?
Gaah, you are right.
Previous: Jeff KingNext: Herbert Xu
Message 8 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.