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

BUG: diff-{index,files,tree} (and git-gui) do not respect the diff.indentHeuristic config setting

From
Marc Branchaud <marcnarc@xiplink.com>
Date
Apr 25, 2017, 17:21 UTC
Message-ID
<19607a03-71e0-440b-7213-64d25f6fa8da@xiplink.com>
So I have
	diff.indentHeuristic = true

and I noticed that git-gui was not using the heuristic. This is because git-gui uses diff-index, and that does not respect the config setting, even though it supports the --indent-heuristic option.

And it looks like diff-files and diff-tree also have the same problem.

I tried a couple of quick-n-dirty things to fix it in diff-index, without success, and I've run out of git-hacking tame, so all I can do for now is throw out a bug report.

diff-index.c explicitly says "no 'diff' UI options" since 83ad63cfeb ("diff: do not use configuration magic at the core-level", 2006-07-08), so maybe this needs to be fixed in git-gui (and maybe elsewhere), but to me it feels like the diff-foo commands should respect the setting.

(CC'ing Michael Haggerty, who added the heuristic.)
(This is git v2.12.2.)
		M.
Next: Jeff King
Message 1 of 2 in “BUG: diff-{index,files,tree} (and git-gui) do not respect the diff.indentHeuristic config setting”
  1. Marc BranchaudApr 25, 2017
  2. Jeff KingApr 25, 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.