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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sun, 11 Mar 2007, James Bowes wrote:

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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]