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*