Skip to content

Commit

Permalink
Merge branch 'jn/gitweb-patch'
Browse files Browse the repository at this point in the history
* jn/gitweb-patch:
  gitweb: Do not show 'patch' link for merge commits
  • Loading branch information
Junio C Hamano committed Oct 19, 2009
2 parents 178071b + 1655c98 commit 023adc0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -5328,7 +5328,7 @@ sub git_commit {
} @$parents ) .
')';
}
if (gitweb_check_feature('patches')) {
if (gitweb_check_feature('patches') && @$parents <= 1) {
$formats_nav .= " | " .
$cgi->a({-href => href(action=>"patch", -replay=>1)},
"patch");
Expand Down Expand Up @@ -5616,7 +5616,7 @@ sub git_commitdiff {
$formats_nav =
$cgi->a({-href => href(action=>"commitdiff_plain", -replay=>1)},
"raw");
if ($patch_max) {
if ($patch_max && @{$co{'parents'}} <= 1) {
$formats_nav .= " | " .
$cgi->a({-href => href(action=>"patch", -replay=>1)},
"patch");
Expand Down Expand Up @@ -5824,7 +5824,7 @@ sub git_commitdiff_plain {

# format-patch-style patches
sub git_patch {
git_commitdiff(-format => 'patch', -single=> 1);
git_commitdiff(-format => 'patch', -single => 1);
}

sub git_patches {
Expand Down

0 comments on commit 023adc0

Please sign in to comment.