Re: [patch 06/15] diff-defaults.patch
From: Gary V. Vaughan <hidden>
Date: 2016-06-15 22:48:42
On Tue, Mar 16, 2010 at 12:22:53AM -0700, Junio C Hamano wrote:
"Gary V. Vaughan" [off-list ref] writes:quoted
By default the testsuite calls 'diff -u' whenever a file comparison is called for. Unfortunately that throws a "diff: unknown option '-u'" error for most non-GNU diffs. This patch sets GIT_TEST_CMP to 'cmp' on all the architectures where that happens.Wouldn't most of these platforms you listed have a working "diff -c" at least? Using it would make debugging the tests easier, as it would be more readable than output from "cmp".
Yes, I've checked, and everything I have access to supports "diff -c" with the vendor implementation.
I also saw your patch to install-webdoc used "$DIFF -u"; as the patch series seem to assume a unified-capable diff implementation is available somewhere, perhaps you do not need this patch after all, but instead just need to default GIT_TEST_CMP to "$DIFF -u" in t/test-lib.sh, no?
That is more than adequate for me, since one of our packages is GNU diffutils, and my git build recipe puts the path to our diffutils package first in PATH before launching configure and make. However, anyone else that wants to build git on a non-"diff -u" capable machine won't necessarily have this luxury. At the moment it's hard for me to tell whether the diff changes are a net win, since I can't get the testsuite to run properly on any of the architectures that would be affected. Cheers, -- Gary V. Vaughan (gary@thewrittenword.com)