git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Junio C HamanoNext: Marc Branchaud
Message 2 of 14 in “What's cooking in git.git (May 2017, #02; Mon, 8)”
  1. Junio C HamanoMay 8, 2017
  2. Enabling the diff "indent" heuristic by defaultMarc Branchaud, May 8, 2017
  3. 0/4 Make diff plumbing commands respect the indentHeuristic.Marc Branchaud, May 8, 2017
  4. 1/4 diff: make the indent heuristic part of diff's basic configurationMarc Branchaud, May 8, 2017
  5. 4/4 add--interactive: drop diff.indentHeuristic handlingMarc Branchaud, May 8, 2017
  6. Jeff KingMay 9, 2017
  7. 2/4 diff: have the diff-* builtins configure diff before initializing revisionsMarc Branchaud, May 8, 2017
  8. Jeff KingMay 9, 2017
  9. Marc BranchaudMay 11, 2017
  10. 3/4 diff: enable indent heuristic by defaultMarc Branchaud, May 8, 2017
  11. Stefan BellerMay 8, 2017
  12. Jeff KingMay 9, 2017
  13. Jeff KingMay 9, 2017
  14. Jeff KingMay 9, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.