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

Re: [BUGS] test failure in t4014-format-patch.sh with master

From
Björn Steinbrink <b.steinbrink@gmx.de>
Date
Apr 17, 2008, 15:34 UTC
Message-ID
<20080417153421.GA13117@atjola.homenet>
In-Reply-To
<alpine.LFD.1.00.0804170806430.2879@woody.linux-foundation.org>
On 2008.04.17 08:11:52 -0700, Linus Torvalds wrote:
Show 27 quoted lines
> 
> 
> On Thu, 17 Apr 2008, Remi Vanicat wrote:
> > 
> > While trying to wrote a test for git, I discover that there is a test
> > failure in master on my computer:
> 
> Hmm. Doesn't fail for me.
> 
> > $ ./t4014-format-patch.sh
> > [....]
> > * FAIL 8: replay did not screw up the log message
> > 
> >  git cat-file commit rebuild-1 | grep "^Side .* with .* backslash-n"
> > 
> > It seem that now, somewhere a \n has been interpreted as a newline.
> 
> I wonder if it is some shell-specific variable expansion issue. What's 
> your /bin/sh? (I assume, from your email address, that you're using 
> Debian, and I thought Debian used bash, but maybe that's not true).
> 
> What does
> 
> 	a="hello\nhi"
> 	echo $a
> 
> result in?

Debian has its own dash which is supposed to be a lightweight alternative to bash and "for checking POSIX compliance of scripts" (quote from the packages description). I don't happen to know off-hand whether POSIX says that echo should default to -e, but dash seems to do that:

$ dash $ a="hello\nhi" $ echo $a hello hi

Björn
Previous: Linus TorvaldsNext: Linus Torvalds
Message 3 of 12 in “[BUGS] test failure in t4014-format-patch.sh with master”
  1. Remi VanicatApr 17, 2008
  2. Linus TorvaldsApr 17, 2008
  3. Björn SteinbrinkApr 17, 2008
  4. Linus TorvaldsApr 17, 2008
  5. Björn SteinbrinkApr 17, 2008
  6. Jeff KingApr 17, 2008
  7. Jeff KingApr 17, 2008
  8. Rémi VanicatApr 17, 2008
  9. Junio C HamanoApr 18, 2008
  10. Linus TorvaldsApr 18, 2008
  11. Rémi VanicatApr 18, 2008
  12. Junio C HamanoApr 19, 2008

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.