Subject: Re: [PATCH 0/3] built-in add -p: support diff-so-fancy better

From: Junio C Hamano <[email-masked]>
Date: Wed, 24 Aug 2022 14:37:12 -0700

Johannes Schindelin <[email-masked]> writes:

> One unfortunate consequence of avoiding the `git diff` invocations of
> `git-add--interactive.perl` that are not actually necessary is that I
> missed that one of those invocations specifically ignores dirty
> submodules, and that the Perl script then only processes files whose
> numstat shows up in _that_ diff output.
>
> Fortunately, the fix is easy: simply ignore dirty submodules in _all_ `git
> diff` invocations of `add -p`.

OK, so it wasn't removing what is useless, but removing something
whose result was used.  And our next move is not to bring us closer
to how we used to correctly handle third-party diff filters by
mimicking the original better but doing the handling of this
particular piece differently.

> I will submit the next iteration as soon as the PR builds pass.

OK.

>> As with any big rewrite, a complete re-implementation always has risks
>> to introduce unintended regressions and that is why starting with
>> faithful rewrite with the staged transition plan is valuable.
>>
>> In this case, the staged transition plan, the step to flip the
>> default without before remove the old one, is working beautifully.
>> And it was only made possible with the actual users reporting issues
>> before they say "the new one is broken, so let's use the knob to
>> retain the old implementation".
>
> Indeed, and thank you, Philippe, for bringing this to the Git mailing list
> so that I could do something about the bug.

Yup.

To some people, "refatoring to match my subjective code aesthetics"
may be personally the most important, and to some other people,
"getting rid of scripted Porcelains" may be, but they are both wrong
and these are their second most important goals ;-)  Not regressing
end-user experience is, and we learned a valuable lesson here.  Be
conservative and make sure we can revert to buy time when making a
big rewrite like this one.

Thanks, all.