[PATCH] shortlog: remove range check

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <junkio@...>
Cc: Johannes Schindelin <johannes.schindelin@...>, <git@...>
Date: Tuesday, November 28, 2006 - 5:49 pm

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>

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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[BUG] git shortlog: need a range!, Junio C Hamano, (Tue Nov 28, 4:20 pm)
Re: [BUG] git shortlog: need a range!, Johannes Schindelin, (Wed Nov 29, 5:38 am)
[PATCH] shortlog: remove range check, , (Tue Nov 28, 5:49 pm)