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

[PATCH] Fix empty line processing in git-shortlog.perl

From
Petr Baudis <pasky@suse.cz>
Date
Nov 6, 2005, 22:42 UTC
Message-ID
<20051106224218.22797.97260.stgit@machine.or.cz>
Faced with a commit such as
	commit f1b2646c7f2713c3ea4bce120e1d0d8091808be4
	Author: Adrian Bunk <bunk@r063144.stusta.swh.mhn.de>
	Date:   Sun Nov 6 20:30:38 2005 +0100
	    From: Michal Wronski <wrona@mat.uni.torun.pl>
	    I've jchanged my email. Please apply this patch so as to everybody
	    could send me a remarks about mqueuefs.
	    Signed-off-by: Michal Wronski <Michal.Wronski@motorola.com>
	    Signed-off-by: Adrian Bunk <bunk@stusta.de>
git-shortlog.perl would produce a line with an empty commit title.

This patch fixes that. I believe that just changing the last * to + in the original regexp would work, but Adrian says it doesn't fix it for him, and I believe this regexp is way clearer anyway. This is also the original regexp used before a24e658649170c99fdcb4aaa41545679ad02f755.

Signed-off-by: Petr Baudis <pasky@suse.cz>
---
 git-shortlog.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-shortlog.perl b/git-shortlog.perl
index 0b14f83..7283159 100755
--- a/git-shortlog.perl
+++ b/git-shortlog.perl
@@ -94,7 +94,7 @@ sub changelog_input {
 
 		# skip to non-blank line
 		elsif ($pstate == 3) {
-			next unless /^\s*?(.*)/;
+			next unless /^\s*?(\S.*)$/;
 
 			# skip lines that are obviously not
 			# a 1-line cset description
Next: Petr Baudis
Message 1 of 4 in “Fix empty line processing in git-shortlog.perl”
  1. Fix empty line processing in git-shortlog.perlPetr Baudis, Nov 6, 2005
  2. Petr BaudisNov 6, 2005
  3. Junio C HamanoNov 7, 2005
  4. Petr BaudisNov 7, 2005

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.