{"thread":{"id":"9967","subject":"[PATCH 2/5] gitweb: No difftree output for trivial merge","startedAt":"2007-09-21T21:36:37Z","lastAt":"2007-09-21T21:36:37Z","messageCount":1,"participants":["Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"53755","messageId":"8fe92b430709211436n562a6c47xf47da740c5cfc747@mail.gmail.com","threadId":"9967","inReplyTo":null,"subject":"[PATCH 2/5] gitweb: No difftree output for trivial merge","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-09-21T21:36:37Z","receivedAt":"2007-09-21T21:36:37Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"In 'commitdiff' view, for the merge commit, there is an extra header\nfor the difftree table, with links to commitdiffs to individual\nparents.  Do not show such header when there is nothing to show, for\ntrivial merges.\n\nThis means that for trivial merge you have to go to 'commit' view\nto get links to diffs to each parent.\n\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\nIt looked a bit stupid, lone \"_1_ _2_\" links.\n\n gitweb/gitweb.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\n\nFrom e895e5b63a580a54c24509a0df631ff4d3dff658 Mon Sep 17 00:00:00 2001\nFrom: Jakub Narebski <jnareb@gmail.com>\nDate: Sat, 8 Sep 2007 21:54:28 +0200\nSubject: [PATCH 2/5] gitweb: No difftree output for trivial merge\n\nIn 'commitdiff' view, for the merge commit, there is an extra header\nfor the difftree table, with links to commitdiffs to individual\nparents.  Do not show such header when there is nothing to show, for\ntrivial merges.\n\nThis means that for trivial merge you have to go to 'commit' view\nto get links to diffs to each parent.\n\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\nIt looked a bit stupid, lone \"_1_ _2_\" links.\n\n gitweb/gitweb.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex c18339f..3064298 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -2809,7 +2809,7 @@ sub git_difftree_body {\n \t      \"diff_tree\\\">\\n\";\n \n \t# header only for combined diff in 'commitdiff' view\n-\tmy $has_header = @parents > 1 && $action eq 'commitdiff';\n+\tmy $has_header = @$difftree && @parents > 1 && $action eq 'commitdiff';\n \tif ($has_header) {\n \t\t# table header\n \t\tprint \"<thead><tr>\\n\" .\n-- \n1.5.3\n\n"}]}