# Re: git reveals a bug in (some versions) BSD diff

2 messages from 2005-08-13 to 2005-08-15. Participants: Brad Roberts, Johannes Schindelin.
Thread: https://gitlist.dev/t/1495

## Brad Roberts, 2005-08-13 10:42

Subject: Re: git reveals a bug in (some versions) BSD diff
Message-ID: <Pine.LNX.4.44.0508130335300.2136-100000@bellevue.puremagic.com>
URL: https://gitlist.dev/e/Pine.LNX.4.44.0508130335300.2136-100000%40bellevue.puremagic.com

```
I'm seeing this on a standard os/x 10.3.9 install which seems to have an
old, but still GNU based, diff.

$ which diff
/usr/bin/diff

$ diff --version
diff - GNU diffutils version 2.7

$ sh ./t4101-apply-nonl.sh
*   ok 1: apply diff between 0 and 1
*   ok 2: apply diff between 0 and 2
*   ok 3: apply diff between 0 and 3
*   ok 4: apply diff between 1 and 0
*   ok 5: apply diff between 1 and 2
*   ok 6: apply diff between 1 and 3
*   ok 7: apply diff between 2 and 0
*   ok 8: apply diff between 2 and 1
* FAIL 9: apply diff between 2 and 3
        git-apply <diff.2-3 && diff frotz.3 frotz
*   ok 10: apply diff between 3 and 0
*   ok 11: apply diff between 3 and 1
* FAIL 12: apply diff between 3 and 2
        git-apply <diff.3-2 && diff frotz.2 frotz
* failed 2 among 12 test(s)

For what it's worth, this is the only test failing on this box (after the
application of the TZ patch I just sent).

Later,
Brad

```

## Johannes Schindelin, 2005-08-15 23:02

Subject: Re: git reveals a bug in (some versions) BSD diff
Message-ID: <Pine.LNX.4.63.0508160100100.26231@wgmdd8.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0508160100100.26231%40wgmdd8.biozentrum.uni-wuerzburg.de
In-Reply-To: <Pine.LNX.4.44.0508130335300.2136-100000@bellevue.puremagic.com>

```
Hi,

On Sat, 13 Aug 2005, Brad Roberts wrote:

> I'm seeing this on a standard os/x 10.3.9 install which seems to have an
> old, but still GNU based, diff.
> 
> $ which diff
> /usr/bin/diff
> 
> $ diff --version
> diff - GNU diffutils version 2.7

That is exactly the same as with 10.2.8.

> [...] 
> * FAIL 9: apply diff between 2 and 3
>         git-apply <diff.2-3 && diff frotz.3 frotz
> * FAIL 12: apply diff between 3 and 2
>         git-apply <diff.3-2 && diff frotz.2 frotz

Yes, that is what I saw, too. Actually, I found the bug in diff-v2.7 
annoying enough that I updated (just diff) to version 2.8.1. That works 
fine.

Ciao,
Dscho

```
