Re: [PATCH 2/2] builtin-prune.c: fix object parsing and use parse_options()

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

 



Hi,

On Sun, 23 Mar 2008, Michele Ballabio wrote:

> -static const char prune_usage[] = "git-prune [-n]";
> +static const char * const prune_usage[] = {
> +	"git-prune [-n] [--expire <time>] [--] [<head>...]",
> +	NULL
> +};

As you already use parse-options, should this not be rather

static const char * const prune_usage[] = {
	"git-prune [options] [--] [<commit>...]",

Hmm?

> +static int parse_opt_expire(const struct option *opt, const char *arg,
> +		int unset)
> +{
> +	expire = approxidate(arg);
> +	return 0;
> +}

This would probably be a good candidate to live in parse-options.[ch], no?

But yes, the patch is good!

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]

  Powered by Linux