Skip to content

Commit 023adc0

Browse files
committed
Merge branch 'jn/gitweb-patch'
* jn/gitweb-patch: gitweb: Do not show 'patch' link for merge commits
2 parents 178071b + 1655c98 commit 023adc0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gitweb/gitweb.perl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5328,7 +5328,7 @@ sub git_commit {
53285328
} @$parents ) .
53295329
')';
53305330
}
5331-
if (gitweb_check_feature('patches')) {
5331+
if (gitweb_check_feature('patches') && @$parents <= 1) {
53325332
$formats_nav .= " | " .
53335333
$cgi->a({-href => href(action=>"patch", -replay=>1)},
53345334
"patch");
@@ -5616,7 +5616,7 @@ sub git_commitdiff {
56165616
$formats_nav =
56175617
$cgi->a({-href => href(action=>"commitdiff_plain", -replay=>1)},
56185618
"raw");
5619-
if ($patch_max) {
5619+
if ($patch_max && @{$co{'parents'}} <= 1) {
56205620
$formats_nav .= " | " .
56215621
$cgi->a({-href => href(action=>"patch", -replay=>1)},
56225622
"patch");
@@ -5824,7 +5824,7 @@ sub git_commitdiff_plain {
58245824

58255825
# format-patch-style patches
58265826
sub git_patch {
5827-
git_commitdiff(-format => 'patch', -single=> 1);
5827+
git_commitdiff(-format => 'patch', -single => 1);
58285828
}
58295829

58305830
sub git_patches {

0 commit comments

Comments
 (0)