Re: [PATCH 1/2] reflog: make the 'show' subcommand really the default

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

 



SZEDER Gábor <szeder@xxxxxxxxxx> writes:

> diff --git a/builtin/reflog.c b/builtin/reflog.c
> index 64e45bd..d4d4409 100644
> --- a/builtin/reflog.c
> +++ b/builtin/reflog.c
> @@ -712,6 +712,5 @@ int cmd_reflog(int argc, const char **argv, const char *prefix)
>  	if (!strcmp(argv[1], "delete"))
>  		return cmd_reflog_delete(argc - 1, argv + 1, prefix);
>  
> -	/* Not a recognized reflog command..*/
> -	usage(reflog_usage);
> +	return cmd_log_reflog(argc, argv, prefix);

I am not convinced that this is a good change.

It may be that show/expire/delete happens to be the _only_ subcommands
today, but if we had this patch, the command will change the behaviour
when we add a new subcommand (the name of that subcommand may happen to be
also a refname).

I'd rather see a fix for the documentation.

Your [PATCH 2/2] looks very sane, though.

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