Re: [PATCH 2/2] builtin-prune.c: fix object parsing and use parse_options()
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Mar 23, 2008, 22:21 UTC
- Message-ID
- <alpine.LSU.1.00.0803232319130.4353@racer.site>
- In-Reply-To
- <200803232150.29971.barra_cuda@katamail.com>
Hi,
On Sun, 23 Mar 2008, Michele Ballabio wrote:
Show 5 quoted lines
> -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?
Show 6 quoted lines
> +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