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

Re: [PATCH] Make gc a builtin.

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 14, 2007, 06:07 UTC
Message-ID
<20070314060727.GC20978@spearce.org>
In-Reply-To
<11738375021267-git-send-email-jbowes@dangerouslyinc.com>
James Bowes <jbowes@dangerouslyinc.com> wrote:
> Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
ACK.  Very nicely done.
...
Show 14 quoted lines
> +	if (pack_refs && run_command_v_opt(argv_pack_refs, RUN_GIT_CMD))
> +		return error(FAILED_RUN, argv_pack_refs[0]);
> +
> +	if (run_command_v_opt(argv_reflog, RUN_GIT_CMD))
> +		return error(FAILED_RUN, argv_reflog[0]);
> +
> +	if (run_command_v_opt(argv_repack, RUN_GIT_CMD))
> +		return error(FAILED_RUN, argv_repack[0]);
> +
> +	if (prune && run_command_v_opt(argv_prune, RUN_GIT_CMD))
> +		return error(FAILED_RUN, argv_prune[0]);
> +
> +	if (run_command_v_opt(argv_rerere, RUN_GIT_CMD))
> +		return error(FAILED_RUN, argv_rerere[0]);
And isn't the above so much more readable than this mess?
Show 6 quoted lines
> -test "true" != "$pack_refs" ||
> -git-pack-refs --prune &&
> -git-reflog expire --all &&
> -git-repack -a -d -l &&
> -$no_prune git-prune &&
> -git-rerere gc || exit
Which is why I like builtins, and why I think Dscho does too.
-- 
Shawn.
Previous: James BowesNext: Junio C Hamano
Message 2 of 10 in “Make gc a builtin.”
  1. Make gc a builtin.James Bowes, Mar 14, 2007
  2. Shawn O. PearceMar 14, 2007
  3. Junio C HamanoMar 14, 2007
  4. Theodore TsoMar 14, 2007
  5. Santi BéjarMar 14, 2007
  6. Junio C HamanoMar 14, 2007
  7. Andy ParkinsMar 14, 2007
  8. Junio C HamanoMar 14, 2007
  9. Andy ParkinsMar 14, 2007
  10. Johannes SchindelinMar 14, 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.