[PATCH] shortlog: remove range check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>

diff --git a/builtin-shortlog.c b/builtin-shortlog.c
index b5b13de..f1124e2 100644
--- a/builtin-shortlog.c
+++ b/builtin-shortlog.c
@@ -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);
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]