git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] shortlog: remove range check

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Nov 28, 2006, 21:49 UTC
Message-ID
<456CAEDD.7030203@lsrfire.ath.cx>
In-Reply-To
<7v8xhv2uj1.fsf@assigned-by-dhcp.cox.net>

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
Previous: Junio C HamanoNext: Johannes Schindelin
Message 2 of 3 in “[BUG] git shortlog: need a range!”
  1. Junio C HamanoNov 28, 2006
  2. shortlog: remove range checkRené Scharfe, Nov 28, 2006
  3. Johannes SchindelinNov 29, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.