Code

shortlog: remove range check
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>
Tue, 28 Nov 2006 21:49:17 +0000 (22:49 +0100)
committerJunio C Hamano <junkio@cox.net>
Tue, 28 Nov 2006 22:00:28 +0000 (14:00 -0800)
Don't force the user to specify more than one revision parameter,
thus making git-shortlog behave more like git-log.
'git-shortlog master' will now produce the expected results; the
other end of the range simply is the (oldest) root commit.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-shortlog.c

index b5b13dee3b3a5fe5877762817af9de7dd22d5c4c..f1124e261b04ca93118c662f391dec41d9ee9713 100644 (file)
@@ -298,9 +298,7 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix)
        if (!access(".mailmap", R_OK))
                read_mailmap(".mailmap");
 
-       if (rev.pending.nr == 1)
-               die ("Need a range!");
-       else if (rev.pending.nr == 0)
+       if (rev.pending.nr == 0)
                read_from_stdin(&list);
        else
                get_from_rev(&rev, &list);