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

Re: [PATCH 8/9] Use git diff instead of diff in t7201

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Feb 6, 2008, 04:30 UTC
Message-ID
<alpine.LNX.1.00.0802052306450.13593@iabervon.org>
In-Reply-To
<7vr6fq6di0.fsf@gitster.siamese.dyndns.org>
On Tue, 5 Feb 2008, Junio C Hamano wrote:
Show 28 quoted lines
> Daniel Barkalow <barkalow@iabervon.org> writes:
> 
> > On Tue, 5 Feb 2008, Junio C Hamano wrote:
> >
> >> Daniel Barkalow <barkalow@iabervon.org> writes:
> >> 
> >> > Well, it's something I tripped over when builtin-checkout wasn't passing 
> >> > the tests and I couldn't figure out what it was doing wrong from the 
> >> > output. Like [3/9], it's relevant to evaluating whether the series works, 
> >> > even if it's not important for whether it actually does work.
> >> 
> >> Yeah, using "diff -u" instead of just "diff" is an improvement
> >> for debuggability which matters a lot in the test scripts.
> >
> > I think I asked before and didn't hear back (or maybe I got distracted 
> > and didn't ask); do you want this to use "diff -u" everywhere or "git 
> > diff" everywhere? This test is currently part "diff" and part "git diff", 
> > and I went for git diff" everywhere, but you seemed to prefer "diff -u".
> 
> Typically the test sequence is "do this with git, do that with
> git, produce the output with git, now what happened?  did we
> produce a correct result?"  And we often compare 'expect' and
> 'actual' to see if there are discrepancies.
> 
> My preference is NEVER using "git diff" when comparing expected
> result and the actual output from git.  When "git diff" has
> breakage, it would break unrelated tests and make debugging
> needlessly harder.

Certainly, although we seem to do a lousy job of ordering tests currently such that the tests that fail are the ones for the thing that's broken; it took a lot of work to get builtin-checkout to the point to reaching t7201-co.sh, and by that point it just about all worked. In any case, I'll go for "diff -u" all around in that test, since I'm changing it.

	-Daniel
*This .sig left intentionally blank*
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 8 in “Use git diff instead of diff in t7201”
  1. 8/9 Use git diff instead of diff in t7201Daniel Barkalow, Feb 4, 2008
  2. Johannes SchindelinFeb 5, 2008
  3. Daniel BarkalowFeb 5, 2008
  4. Junio C HamanoFeb 5, 2008
  5. Daniel BarkalowFeb 6, 2008
  6. Junio C HamanoFeb 6, 2008
  7. Daniel BarkalowFeb 6, 2008
  8. Junio C HamanoFeb 6, 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.