Enabling the diff "indent" heuristic by default
- From
Marc Branchaud <marcnarc@xiplink.com>
- Date
- May 8, 2017, 14:54 UTC
- Message-ID
- <f867af6f-b601-251a-86a4-ede0bb942efb@xiplink.com>
- In-Reply-To
- <xmqqlgq77pse.fsf@gitster.mtv.corp.google.com>
On 2017-05-08 03:48 AM, Junio C Hamano wrote:
> > * mb/diff-default-to-indent-heuristics (2017-05-02) 4 commits > (merged to 'next' on 2017-05-08 at 158f401a92)
I think there's a general open question about this, which is whether or not we should just drop the diff.indentHeuristic configuration setting altogether.
Peff made the point [0] that if we keep the setting then t4061 should be rewritten.
My instinct is to keep the setting, at least until the changed default has a bit of time to settle in. So I'll re-send the topic with the renovated t4061.
The topic would of course change more drastically if we decide to drop the setting right away.
Show 6 quoted lines
> + add--interactive: drop diff.indentHeuristic handling > + diff: enable indent heuristic by default > + diff: have the diff-* builtins configure diff before initializing revisions > + diff: make the indent heuristic part of diff's basic configuration > > Make the "indent" heuristics the default in "diff" and diff.indentHeuristics
s/heuristics/heuristic/ (both places)
> configuration variable an escape hatch for those who do no want it.
s/do no/do not/
> Will cook in 'next'.
Both Peff [1] and Ævar [2] mentioned situations where enabling the heuristic has a small impact on them. If/when this graduates, it's perhaps worth adding a backward-compatibility note that the default patch IDs are changing. Maybe something like:
The diff "indent" heuristic is now enabled by default. This changes the patch IDs calculated by git-patch-id and used by git-cherry, which could affect patch-based workflows that rely on previously-computed patch IDs. The heuristic can be disabled by setting diff.indentHeuristic to false.
[0] https://public-inbox.org/git/20170501222051.svylxazjwnot3wwg@sigill.intra.peff.net/
[1] https://public-inbox.org/git/20170428220450.olqitnuwhrxzg3pv@sigill.intra.peff.net/
[2] https://public-inbox.org/git/CACBZZX5f81HKCjRjTDyXzNMVuef9Z_ECS+0SVk2xpbwXudgxCw@mail.gmail.com/
M.