Skip to content

Commit bf01d4a

Browse files
Michael Schubertgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d5b6629 commit bf01d4a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

builtin/reflog.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,5 @@ int cmd_reflog(int argc, const char **argv, const char *prefix)
777777
if (!strcmp(argv[1], "delete"))
778778
return cmd_reflog_delete(argc - 1, argv + 1, prefix);
779779

780-
/* Not a recognized reflog command..*/
781-
usage(reflog_usage);
780+
return cmd_log_reflog(argc, argv, prefix);
782781
}

0 commit comments

Comments
 (0)