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

[PATCH 2/5] gitweb: No difftree output for trivial merge

From
Jakub Narebski <jnareb@gmail.com>
Date
Sep 21, 2007, 21:36 UTC
Message-ID
<8fe92b430709211436n562a6c47xf47da740c5cfc747@mail.gmail.com>

In 'commitdiff' view, for the merge commit, there is an extra header for the difftree table, with links to commitdiffs to individual parents. Do not show such header when there is nothing to show, for trivial merges.

This means that for trivial merge you have to go to 'commit' view to get links to diffs to each parent.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
It looked a bit stupid, lone "_1_ _2_" links.
 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
From e895e5b63a580a54c24509a0df631ff4d3dff658 Mon Sep 17 00:00:00 2001
From: Jakub Narebski <jnareb@gmail.com>
Date: Sat, 8 Sep 2007 21:54:28 +0200
Subject: [PATCH 2/5] gitweb: No difftree output for trivial merge

In 'commitdiff' view, for the merge commit, there is an extra header for the difftree table, with links to commitdiffs to individual parents. Do not show such header when there is nothing to show, for trivial merges.

This means that for trivial merge you have to go to 'commit' view to get links to diffs to each parent.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
It looked a bit stupid, lone "_1_ _2_" links.
 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index c18339f..3064298 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2809,7 +2809,7 @@ sub git_difftree_body {
 	      "diff_tree\">\n";
 
 	# header only for combined diff in 'commitdiff' view
-	my $has_header = @parents > 1 && $action eq 'commitdiff';
+	my $has_header = @$difftree && @parents > 1 && $action eq 'commitdiff';
 	if ($has_header) {
 		# table header
 		print "<thead><tr>\n" .
-- 
1.5.3
Message 1 of 1 in “gitweb: No difftree output for trivial merge”
  1. 2/5 gitweb: No difftree output for trivial mergeJakub Narebski, Sep 21, 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.