reflog: actually default to subcommand 'show'
The reflog manpage says: git reflog [show] [log-options] [<ref>] the subcommand 'show' is the default "in the absence of any subcommands". Currently this is only true if the user provided either at least one option or no additional argument at all. For example: git reflog master won't work. Change this by actually calling cmd_log_reflog in absence of any subcommand. Signed-off-by: Michael Schubert <mschub@elegosoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Schubert committed
Aug 1, 2011 at 13:20 UTC
bf01d4a334c621abdc76a5bdeac252296d9b23cb
1 file changed
+1
-2
builtin/reflog.c
+1
-2
@@ -777,6 +777,5 @@ int cmd_reflog(int argc, const char **argv, const char *prefix)
777
if (!strcmp(argv[1], "delete"))
778
return cmd_reflog_delete(argc - 1, argv + 1, prefix);
779
780
- /* Not a recognized reflog command..*/
781
- usage(reflog_usage);
780
+ return cmd_log_reflog(argc, argv, prefix);
781
}