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