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

Re: [PATCH] 2.36 format-patch regression fix

From
Carlo Marcelo Arenas Belón <carenas@gmail.com>
Date
Apr 30, 2022, 16:32 UTC
Message-ID
<20220430163232.ytvwru4fnylow2jk@carlos-mbp.lan>
In-Reply-To
<c36896a1-6247-123b-4fa3-b7eb24af1897@web.de>
On Sat, Apr 30, 2022 at 12:32:44PM +0200, René Scharfe wrote:
Show 8 quoted lines
> e900d494dc (diff: add an API for deferred freeing, 2021-02-11) added a
> way to allow reusing diffopts: the no_free bit.  244c27242f (diff.[ch]:
> have diff_free() call clear_pathspec(opts.pathspec), 2022-02-16) made
> that mechanism mandatory.
> 
> git format-patch only sets no_free when --output is given, causing it to
> forget pathspecs after the first commit.  Set no_free unconditionally
> instead.

I remember when I saw the first commit long ago, and thought; well that is very round about way to reintroduce the UNLEAK removal that might have made it visible.

Haven't looked too closely, but considering that we were warned[1] the interface was hard to use and might cause problems later and it did.

wouldn't it a better and more secure solution to UNLEAK and remove all this code, at least until it could be refactored cleanly, of course?

Carlo
[1] https://lore.kernel.org/git/YCUFNVj7qlt9wzlX@coredump.intra.peff.net/
Previous: René ScharfeNext: René Scharfe
Message 5 of 10 in “Bug: `git show` honors path filters only for the first commit”
  1. Daniel LiApr 30, 2022
  2. Junio C HamanoApr 30, 2022
  3. 2.36 show regression fixJunio C Hamano, Apr 30, 2022
  4. 2.36 format-patch regression fixRené Scharfe, Apr 30, 2022
  5. Carlo Marcelo Arenas BelónApr 30, 2022
  6. René ScharfeMay 1, 2022
  7. the state of diff_free() and release_revisions() (was: [PATCH] 2.36 format-patch regression fix)Ævar Arnfjörð Bjarmason, May 20, 2022
  8. Junio C HamanoMay 20, 2022
  9. 2.36 fast-export regression fixRené Scharfe, Apr 30, 2022
  10. Junio C HamanoApr 30, 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.