git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 20, 2010, 00:46 UTC
Message-ID
<7veiiblzn9.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1271670750-30297-1-git-send-email-szeder@ira.uka.de>
SZEDER Gábor <szeder@ira.uka.de> writes:
Show 11 quoted lines
> 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.
Previous: SZEDER GáborNext: Jeff King
Message 3 of 6 in “reflog: make the 'show' subcommand really the default”
  1. 1/2 reflog: make the 'show' subcommand really the defaultSZEDER Gábor, Apr 19, 2010
  2. 2/2 reflog: remove 'show' from 'expire's usage stringSZEDER Gábor, Apr 19, 2010
  3. Junio C HamanoApr 20, 2010
  4. Jeff KingApr 20, 2010
  5. SZEDER GáborApr 22, 2010
  6. Jeff KingApr 22, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.