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

gitk regression in version 2.36.0

From
Matthias Aßhauer <mha1993@live.de>
Date
Apr 23, 2022, 05:25 UTC
Message-ID
<AM0PR04MB6019ECF053F1FB7B29D75AB7A5F69@AM0PR04MB6019.eurprd04.prod.outlook.com>

Git 2.36.0 (or more precisely 244c27242f (diff.[ch]: have diff_free() call clear_pathspec(opts.pathspec), 2022-02-16)) introduced some change in behaviour that causes gitks highlight feature not to work correctly anymore.

Here's a quick reproducer based on git.git:

git checkout 244c27242f44e6b88e3a381c90bde08d134c274b~1 make install git checkout 244c27242f44e6b88e3a381c90bde08d134c274b PATH=~/bin:$PATH ~/bin/gitk # In commit 4c53a8c20f (Git 2.35.1, 2022-01-28) (2nd from the top) # right click GIT-VERSION-GEN and select "Highlight this only". # You'll see 4c53a8c20f (Git 2.35.1, 2022-01-28) and # 89bece5c8c (Git 2.35, 2022-01-24) highlighted, but not the surrounding # commits. Exit gitk. make install PATH=~/bin:$PATH ~/bin/gitk # In commit 4c53a8c20f (Git 2.35.1, 2022-01-28) (2nd from the top) # right click GIT-VERSION-GEN and select "Highlight this only". # Almost every non-merge commmit will be highlighted.

I think this is a change in behaviour in `git diff-tree`, but I'm honestly not sure what arguments gitk passes to `git diff-tree`, so I'm struggling to figure out what exactly changed.

This issue was originally reported as a Git for Windows issue [1], but I can also reproduce it on Linux.

[1] https://github.com/git-for-windows/git/issues/3815
Next: Junio C Hamano
Message 1 of 16 in “gitk regression in version 2.36.0”
  1. Matthias AßhauerApr 23, 2022
  2. Junio C HamanoApr 23, 2022
  3. Junio C HamanoApr 23, 2022
  4. René ScharfeApr 23, 2022
  5. Junio C HamanoApr 23, 2022
  6. 2.36 gitk/diff-tree --stdin regression fixJunio C Hamano, Apr 25, 2022
  7. t4013: diff-tree --stdin with pathspecJunio C Hamano, Apr 25, 2022
  8. Phillip WoodApr 26, 2022
  9. Phillip WoodApr 26, 2022
  10. Junio C HamanoApr 26, 2022
  11. Junio C HamanoApr 26, 2022
  12. 2.36 gitk/diff-tree --stdin regression fixJunio C Hamano, Apr 26, 2022
  13. René ScharfeApr 27, 2022
  14. René ScharfeApr 27, 2022
  15. Junio C HamanoApr 27, 2022
  16. René ScharfeApr 23, 2022

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.