Re: [PATCH 2/2] ls-files: add --sparse option
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Dec 16, 2021, 14:11 UTC
- Message-ID
- <3910553a-019c-24bf-a058-ef47dfe28393@gmail.com>
- In-Reply-To
- <xmqq7dc8co3d.fsf@gitster.g>
On 12/13/2021 2:16 PM, Junio C Hamano wrote:
Show 23 quoted lines
> Derrick Stolee <stolee@gmail.com> writes: > >> You're talking about this hunk, right? >> >> if test -z "$GIT_TEST_CMP" >> then >> if test -n "$GIT_TEST_CMP_USE_COPIED_CONTEXT" >> then >> GIT_TEST_CMP="$DIFF -c" >> else >> GIT_TEST_CMP="$DIFF -u" >> fi >> fi >> >> This only switches from "diff -u" to "diff -c" if the >> GIT_TEST_CMP_USE_COPIED_CONTEXT variable is set, but it is not set >> by default. Thus, we are using "diff -u" by default throughout. > > That it can be set merely means that somebody needed to work around > the lack of "-u" format in their implementation of "diff". It came > to POSIX only at the Issue 7 of the standard (cf. [*1*]). > > Unconditional use of "diff -u" is a breaking change for them.
Yes, noted. I'm currently waiting for ld/sparse-diff-blame to merge to 'master' before sending a new version, since there are unrelated build failures without taking newer changes in 'master'.
Thanks, -Stolee