# [PATCH/RFC 0/8] use "git diff" in the test suite

4 messages from 2007-02-25 to 2007-02-25. Participants: Johannes Schindelin, Junio C Hamano.
Thread: https://gitlist.dev/t/6956

## Johannes Schindelin, 2007-02-25 22:34

Subject: [PATCH/RFC 0/8] use "git diff" in the test suite
Message-ID: <Pine.LNX.4.63.0702252329550.22628@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0702252329550.22628%40wbgn013.biozentrum.uni-wuerzburg.de

```
Hi,

Now that --no-index is supported by git's diff, we can use much of the 
test suite to do the job, instead of relying on GNU diff.

This is a bit work-in-progress, since the handling of "-" as a filename is 
not fleshed out yet, and we really should have the "--quiet" option. But I 
got side-tracked by the edit-patch-series script, and did not want to hold 
these patches off any longer.

Ciao,
Dscho

```

## Johannes Schindelin, 2007-02-25 22:50

Subject: Re: [PATCH/RFC 0/8] use "git diff" in the test suite
Message-ID: <Pine.LNX.4.63.0702252349390.22628@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0702252349390.22628%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <Pine.LNX.4.63.0702252329550.22628@wbgn013.biozentrum.uni-wuerzburg.de>

```
Hi,

somehow, patch 7/8 did not come through, I guess, so here is how to do it 
yourself:

$ perl -pi.bak -e "s/(^\s*|'|&&\s*)cmp -s /\1git diff /" *.sh

We should probably add a "--quiet" flag for the diff family first, and use 
that...

Ciao,
Dscho

```

## Junio C Hamano, 2007-02-25 23:11

Subject: Re: [PATCH/RFC 0/8] use "git diff" in the test suite
Message-ID: <7vps7xrfxa.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vps7xrfxa.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <Pine.LNX.4.63.0702252329550.22628@wbgn013.biozentrum.uni-wuerzburg.de>

```
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> Now that --no-index is supported by git's diff, we can use much of the 
> test suite to do the job, instead of relying on GNU diff.
>
> This is a bit work-in-progress, since the handling of "-" as a filename is 
> not fleshed out yet, and we really should have the "--quiet" option. But I 
> got side-tracked by the edit-patch-series script, and did not want to hold 
> these patches off any longer.

As you said yourself [6/8], [7/8], and [8/8] are mechanical
conversions, and I do not think it is too much effort involved
on your side to "hold these patches off".

My preference is to apply [1/8] now, cook the result in 'next'
for a few days longer to see if anybody complains or finds
glitches in the diff-ni series so far, push it out to 'master'
and then apply [2/8] and [3/8] while on 'master'.  The remainder
would be forked into a topic branch and cooked in 'pu' and then
'next' as usual.

Also I do not think we would necessarily want [7/8] and [8/8].
It would help with tests on broken distributions whose 'cmp'
misbehaves when the output is redirected to /dev/null, but I do
not think it is a good enough reason to make the tests slower.

```

## Johannes Schindelin, 2007-02-25 23:19

Subject: Re: [PATCH/RFC 0/8] use "git diff" in the test suite
Message-ID: <Pine.LNX.4.63.0702260015560.22628@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0702260015560.22628%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <7vps7xrfxa.fsf@assigned-by-dhcp.cox.net>

```
Hi,

On Sun, 25 Feb 2007, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > Now that --no-index is supported by git's diff, we can use much of the 
> > test suite to do the job, instead of relying on GNU diff.
> >
> > This is a bit work-in-progress, since the handling of "-" as a 
> > filename is not fleshed out yet, and we really should have the 
> > "--quiet" option. But I got side-tracked by the edit-patch-series 
> > script, and did not want to hold these patches off any longer.
> 
> As you said yourself [6/8], [7/8], and [8/8] are mechanical conversions, 
> and I do not think it is too much effort involved on your side to "hold 
> these patches off".
> 
> My preference is to apply [1/8] now, cook the result in 'next' for a few 
> days longer to see if anybody complains or finds glitches in the diff-ni 
> series so far, push it out to 'master' and then apply [2/8] and [3/8] 
> while on 'master'.  The remainder would be forked into a topic branch 
> and cooked in 'pu' and then 'next' as usual.

I fully agree.

BTW I think that using 020600 as mode for "-" when it means stdin would 
fix [4/8]...

> Also I do not think we would necessarily want [7/8] and [8/8]. It would 
> help with tests on broken distributions whose 'cmp' misbehaves when the 
> output is redirected to /dev/null, but I do not think it is a good 
> enough reason to make the tests slower.

I think with the upcoming "--quiet", which exits early on error, 
performance should be about par. Actually, I went off in this direction 
because I still use an OpenSUSE 10.1 install DVD, which has this broken 
cmp...

But I do not care deeply. (It was a good test case for diff-ni, though...)

Ciao,
Dscho

```
