Re: gitk regression in version 2.36.0
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 23, 2022, 06:05 UTC
- Message-ID
- <xmqqlevw2v2d.fsf@gitster.g>
- In-Reply-To
- <xmqqpml82vkd.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 8 quoted lines
> Matthias Aßhauer <mha1993@live.de> 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-<.