git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jakub Narebski" <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH 2/5] gitweb: No difftree output for trivial merge
Date: Fri, 21 Sep 2007 23:36:37 +0200	[thread overview]
Message-ID: <8fe92b430709211436n562a6c47xf47da740c5cfc747@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]

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(-)

[-- Attachment #2: 0002-gitweb-No-difftree-output-for-trivial-merge.patch --]
[-- Type: application/octet-stream, Size: 1193 bytes --]

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


                 reply	other threads:[~2007-09-21 21:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8fe92b430709211436n562a6c47xf47da740c5cfc747@mail.gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).