Junio C Hamano <gitster@xxxxxxxxx> writes: > Matthias Aßhauer <mha1993@xxxxxxx> writes: > >> 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. > > Nicely found. A simple reproduction recipe without gitk is a command line invocation like this: $ git rev-list -10 --max-parents=1 v2.36.0 -- Documentation | git diff-tree --stdin --stat -- Documentation The upstream of the pipe lists 10 topmost non-merge commits, going back from v2.36.0, that touch Documentation/ directory, and the downstream "diff-tree" is told to show for each of these commits to compute equivalent of "git show --stat -- Documentation", i.e. only the Documentation directory. But "diff-tree" loses pathspec and we will see paths outside Documentation appearing in the output. If I substitute "git diff-tree" on the downstream of the pipe with the version from v2.35.0, of course the correct thing happens X-<.