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

Re: [PATCH 2/2] Make gc a builtin.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 11, 2007, 22:48 UTC
Message-ID
<Pine.LNX.4.63.0703112332550.22628@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<1173650820969-git-send-email-jbowes@dangerouslyinc.com>
Hi,
On Sun, 11 Mar 2007, James Bowes wrote:
Show 7 quoted lines
> +	if (pack_refs)
> +		run_command_or_die("git-pack-refs", "--prune", NULL);
> +	run_command_or_die("git-reflog", "expire", "--all", NULL);
> +	run_command_or_die("git-repack", "-a", "-d", "-l", NULL);
> +	if (prune)
> +		run_command_or_die("git-prune", NULL);
> +	run_command_or_die("git-rerere", "gc", NULL);

Shawn recently sent a series which discourages the va_list versions of run_command. I think that makes sense. So, using run_command_v_opt(argv_pack_refs, RUN_GIT_CMD) would be better IMHO.

And instead of die()ing, I'd rather do something like
	return (pack_refs || run_command_v_opt(argv_pack_refs, RUN_GIT_CMD) &&
		run_command_v_opt(argv_reflog_expire, RUN_GIT_CMD) &&
		run_command_v_opt(argv_repack, RUN_GIT_CMD) &&
		(prune || run_command_v_opt(argv_prune, RUN_GIT_CMD) &&
		run_command_v_opt(argv_rerere, RUN_GIT_CMD);
Hmm?

Ciao, Dscho

Previous: James BowesNext: Junio C Hamano
Message 4 of 15 in “Make gc a builtin.”
  1. 0/2 Make gc a builtin.James Bowes, Mar 11, 2007
  2. 1/2 run-command: Make run_command_va_opt public and add run_command_vaJames Bowes, Mar 11, 2007
  3. 2/2 Make gc a builtin.James Bowes, Mar 11, 2007
  4. Johannes SchindelinMar 11, 2007
  5. Junio C HamanoMar 12, 2007
  6. Make gc a builtin.James Bowes, Mar 12, 2007
  7. Shawn O. PearceMar 12, 2007
  8. Johannes SchindelinMar 12, 2007
  9. Theodore TsoMar 12, 2007
  10. Johannes SchindelinMar 12, 2007
  11. Theodore TsoMar 12, 2007
  12. Linus TorvaldsMar 12, 2007
  13. Jakub NarebskiMar 13, 2007
  14. Linus TorvaldsMar 13, 2007
  15. Shawn O. PearceMar 12, 2007

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.