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

Re: [PATCH 3/6] revision: add wrapper to setup_revisions() from a strvec

From
Jeff King <peff@peff.net>
Date
Sep 20, 2025, 05:48 UTC
Message-ID
<20250920054828.GA996396@coredump.intra.peff.net>
In-Reply-To
<CAPig+cRSQAs79oVmNqvfqhEr6K3T1FR13NwbE50A5CCMJ8RqSA@mail.gmail.com>
On Sat, Sep 20, 2025 at 01:10:50AM -0400, Eric Sunshine wrote:
Show 13 quoted lines
> On Fri, Sep 19, 2025 at 6:51 PM Jeff King <peff@peff.net> wrote:
> > The setup_revisions() function was designed to take the argc/argv pair
> > from the operating system. But we sometimes construct our own argv using
> > a strvec and pass that in. There are a few gotchas that callers need to
> > deal with here:
> > [...]
> > We'll start by converting all of the call-sites which the
> > free_removed_argv_elements option. There should be no behavior change
> > for them, except that their "shrunken" entries are cleaned up
> > immediately, rather than waiting for a strvec_clear() call.
> 
> There is some grammatical problem with the first sentence of this
> paragraph which makes it difficult to decipher.
Urgh, sorry. Should be:
   We'll start by converting all of the call-sites which use the
   free_removed_argv_elements option.
-Peff
Previous: Eric SunshineNext: Jeff King
Message 21 of 26 in “[BUG] git stash show -p with invalid option aborts with double-free in show_stash() (strvec_clear)”
  1. Lauri NiskanenSep 19, 2025
  2. Kristoffer HaugsbakkSep 19, 2025
  3. Junio C HamanoSep 19, 2025
  4. Jeff KingSep 19, 2025
  5. Junio C HamanoSep 19, 2025
  6. Junio C HamanoSep 19, 2025
  7. Jeff KingSep 19, 2025
  8. Junio C HamanoSep 19, 2025
  9. Jeff KingSep 19, 2025
  10. 0/6 fixing double-frees and leaks via setup_revisions()Jeff King, Sep 19, 2025
  11. 1/6 stash: tell setup_revisions() to free our allocated stringsJeff King, Sep 19, 2025
  12. Junio C HamanoSep 22, 2025
  13. Jeff KingSep 22, 2025
  14. Junio C HamanoSep 22, 2025
  15. Jeff KingSep 22, 2025
  16. Junio C HamanoSep 22, 2025
  17. Jeff KingSep 23, 2025
  18. 2/6 revision: manage memory ownership of argv in setup_revisions()Jeff King, Sep 19, 2025
  19. 3/6 revision: add wrapper to setup_revisions() from a strvecJeff King, Sep 19, 2025
  20. Eric SunshineSep 20, 2025
  21. Jeff KingSep 20, 2025
  22. 4/6 treewide: use setup_revisions_from_strvec() when we have a strvecJeff King, Sep 19, 2025
  23. 5/6 treewide: pass strvecs around for setup_revisions_from_strvec()Jeff King, Sep 19, 2025
  24. Jeff KingSep 19, 2025
  25. 6/6 revision: retain argv NULL invariant in setup_revisions()Jeff King, Sep 19, 2025
  26. Jeff KingSep 19, 2025

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.