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

Re: [PATCH] gc: fix off-by-one in append_option

From
Jeff King <peff@peff.net>
Date
Apr 18, 2012, 21:07 UTC
Message-ID
<20120418210740.GA21214@sigill.intra.peff.net>
In-Reply-To
<20120418202116.GA12964@sigill.intra.peff.net>
On Wed, Apr 18, 2012 at 01:21:16PM -0700, Jeff King wrote:
Show 7 quoted lines
> > I am perfectly OK with even without initializers, like this:
> > 
> > 	struct argv_array repack = ARGV_ARRAY_INIT;
> > 	argv_array_push_strings(&repack, "repack", "-d", "-l", NULL);
> 
> I think that is sane, and certainly the simplest. I'll send a patch in a
> moment.

Here it is. This goes directly on top of 7e52f56 (the tip of jk/repack-no-explode-objects-from-old-pack). The off-by-one fix I sent earlier can be dropped, as that code is removed by the final patch below.

  [1/3]: argv-array: refactor empty_argv initialization
  [2/3]: argv-array: add a new "pushl" method
  [3/3]: gc: use argv-array for sub-commands
-Peff
Previous: Jeff KingNext: Jeff King
Message 5 of 8 in “gc: fix off-by-one in append_option”
  1. gc: fix off-by-one in append_optionJeff King, Apr 17, 2012
  2. Jeff KingApr 18, 2012
  3. Junio C HamanoApr 18, 2012
  4. Jeff KingApr 18, 2012
  5. Jeff KingApr 18, 2012
  6. 1/3 argv-array: refactor empty_argv initializationJeff King, Apr 18, 2012
  7. 2/3 argv-array: add a new "pushl" methodJeff King, Apr 18, 2012
  8. 3/3 gc: use argv-array for sub-commandsJeff King, Apr 18, 2012

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.