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

[PATCH 2/2] gitweb: There can be empty patches (in git_patchset_body)

From
Jakub Narebski <jnareb@gmail.com>
Date
Jan 3, 2007, 19:47 UTC
Message-ID
<11678536473286-git-send-email-jnareb@gmail.com>
In-Reply-To
<11678536452473-git-send-email-jnareb@gmail.com>

We now do not skip over empty patches in git_patchset_body (where empty means that they consist only of git diff header, and of extended diff header), so uncomment branch of code dealing with empty patches (patches which do not have even two-line from/to header)

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 05b3876..2ead917 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2527,7 +2527,7 @@ sub git_patchset_body {
 		print "<div class=\"diff from_file\">$patch_line</div>\n";
 
 		$patch_line = <$fd>;
-		#last PATCH unless $patch_line;
+		last PATCH unless $patch_line;
 		chomp $patch_line;
 
 		#assert($patch_line =~ m/^+++/) if DEBUG;
-- 
1.4.4.3
Previous: Jakub Narebski
Message 2 of 2 in “gitweb: Fix bug in git_difftree_body (was '!=' instead of 'ne')”
  1. 1/2 gitweb: Fix bug in git_difftree_body (was '!=' instead of 'ne')Jakub Narebski, Jan 3, 2007
  2. 2/2 gitweb: There can be empty patches (in git_patchset_body)Jakub Narebski, Jan 3, 2007

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.