On 2020-03-23 13:50:48-0700, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Danh Doan <congdanhqx@xxxxxxxxx> writes: > > > A comment in test-lib-functions::test_cmp mentions that > > there _is_ a diff out there that doesn't understand "-u". > > That came from 82ebb0b6 (add test_cmp function for test scripts, > 2008-03-12). > > The change history at the end of the page: > > https://pubs.opengroup.org/onlinepubs/9699919799/utilities/diff.html > > suggests that POSIX did not require "diff -u" until Issue 7, so it > is not surprising that the lack of "diff -u" to cause test_cmp to > fail was of real concern back in March 2008, as the application of > the errata have been only an year and half old, according to: > > https://www.opengroup.org/austin/docs/austin_325.txt > > I vaguely recall that some open source projects only took the copied > context diffs and not unified ones the last time I checked, but > admittedly (1) that "last time" was a long time ago and (2) our > popularity and the fact that we do not understand copied context > [*1*] may have forced people to move away from "-c" and adopt "-u" > at the same time. > > So it might be OK to write off any system that does not understand > "diff -u" as an unusable trash these days ;-) >From the setting in "config.mak.uname", it's likely those systems don't understand "diff -u": - Solaris 5.6, 5.7, 5.8, 5.9: both of them are un-supported version by their vendor - AIX, only AIX 5.3 doesn't understand "-u", the end-of-support AIX 6.1's diff(1) understand "-u" (1) - HP-UX: From what I can collect, HP-UX still conforms to UNIX-03, and its diff(1) doesn't understand "-u" Hence, if we're going to drop support for system that doesn't understand "diff -u", we're going to: - remove support for those variables: + GIT_TEST_CMP_USE_COPIED_CONTEXT + GIT_TEST_CMP - drop support for: + Solaris 5.{6,7,8,} and AIX 5.3, which will be fine + HP-UX: which needs to be discussed [1]: https://public.dhe.ibm.com/systems/power/docs/aix/61/aixcmds2_pdf.pdf page 133(143) -- Danh