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

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-<.

Previous: Junio C HamanoNext: René Scharfe
Message 3 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.