threads / patch / 9967

patch, 5 partsgitweb: No difftree output for trivial merge

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

## tl;dr

One message between Sep 21, 2007 and Sep 21, 2007. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Jakub Narebski· Sep 21, 2007, 21:36 UTC · lore

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(-)
Show changes to gitweb/gitweb.perl +1 −1
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

← back to recent threads