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

Re: gitk regression in version 2.36.0

From
René Scharfe <l.s.r@web.de>
Date
Apr 23, 2022, 10:13 UTC
Message-ID
<737bd2f8-dfd7-6a51-b7f5-33eefa33e975@web.de>
In-Reply-To
<xmqqpml82vkd.fsf@gitster.g>
Am 23.04.22 um 07:54 schrieb Junio C Hamano:
Show 14 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.
>
> I am reasonably sure that reverting that commit will be the right
> thing to do.  It is somewhat unfortunate that it would reintroduce
> resource leaks that having clear_pathspec() in a wrong place (i.e.
> diff_free()) was covering up.  We should instead need to find the
> place where a diff_opt struct goes out of scope (after being used
> for zero or more times, calling diff_free() after each iteration to
> release resources consumed per-iteration) and call clear_pathspec().
Right; a small memory leak is better than wrong output.

Finding those places is a bit complicated by diff_options often being embedded in struct rev_info, though.

René
PS: And I need to learn to download new posts before hitting Send
(or become faster); sorry for my near-duplicate reply.
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 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.