All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: James Bowes <jbowes@dangerouslyinc.com>
Cc: git@vger.kernel.org, junkio@cox.net, Johannes.Schindelin@gmx.de
Subject: Re: [PATCH] Make gc a builtin.
Date: Wed, 14 Mar 2007 02:07:27 -0400	[thread overview]
Message-ID: <20070314060727.GC20978@spearce.org> (raw)
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.

...
> +	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?

> -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.

  reply	other threads:[~2007-03-14  6:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-14  1:58 [PATCH] Make gc a builtin James Bowes
2007-03-14  6:07 ` Shawn O. Pearce [this message]
2007-03-14  7:19   ` Junio C Hamano
2007-03-14  7:44     ` Theodore Tso
2007-03-14  7:55       ` Santi Béjar
2007-03-14  9:29         ` Junio C Hamano
2007-03-14 10:45       ` Andy Parkins
2007-03-14 11:12         ` Junio C Hamano
2007-03-14 11:48           ` Andy Parkins
2007-03-14 12:19           ` Johannes Schindelin
  -- strict thread matches above, loose matches on Subject: below --
2007-03-13 23:03 James Bowes
2007-03-14  1:05 ` Johannes Schindelin
2007-03-14  1:37   ` Brian Gernhardt
2007-03-11 22:06 [PATCH 0/2] " James Bowes
2007-03-11 22:06 ` [PATCH 2/2] " James Bowes
2007-03-11 22:48   ` Johannes Schindelin
2007-03-12  2:11     ` Junio C Hamano
2007-03-12  2:51       ` [PATCH] " James Bowes
2007-03-12 14:43         ` Shawn O. Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070314060727.GC20978@spearce.org \
    --to=spearce@spearce.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=jbowes@dangerouslyinc.com \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.