git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] reflog: make the 'show' subcommand really the default
@ 2010-04-19  9:52 SZEDER Gábor
  2010-04-19  9:52 ` [PATCH 2/2] reflog: remove 'show' from 'expire's usage string SZEDER Gábor
  2010-04-20  0:46 ` [PATCH 1/2] reflog: make the 'show' subcommand really the default Junio C Hamano
  0 siblings, 2 replies; 6+ messages in thread
From: SZEDER Gábor @ 2010-04-19  9:52 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Linus Torvalds, git, SZEDER Gábor

Since the introduction of the 'show' subcommand in cf39f54e (git
reflog show, 2007-02-08), 'git reflog's documentation states that in
the absence of any subcommands 'show' is the default.  Although 'git
reflog <log-options>' works as described, i.e. it defaults to 'show',
the command 'git reflog <ref>' errors out showing the usage instead of
showing the specified ref's reflog.  Fix this by treating an unknown
subcommand as a ref for 'show'.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
---
 builtin/reflog.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

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);
 }
-- 
1.7.1.rc1.43.gf0841

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-04-22 14:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-19  9:52 [PATCH 1/2] reflog: make the 'show' subcommand really the default SZEDER Gábor
2010-04-19  9:52 ` [PATCH 2/2] reflog: remove 'show' from 'expire's usage string SZEDER Gábor
2010-04-20  0:46 ` [PATCH 1/2] reflog: make the 'show' subcommand really the default Junio C Hamano
2010-04-20 11:37   ` Jeff King
2010-04-22 13:57     ` SZEDER Gábor
2010-04-22 14:40       ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).