diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-09-25 15:17:22 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-09-25 15:17:22 -0700 |
commit | d3f3ab264fa2c332fc451a5f97e25fc5c0551f1a (patch) | |
tree | 48c46de0a5cd9df5147a17df562d52c855564ffd | |
parent | Do not over-quote the -f envelopesender value. (diff) | |
parent | gitweb: No difftree output for trivial merge (diff) | |
download | tgif-d3f3ab264fa2c332fc451a5f97e25fc5c0551f1a.tar.xz |
Merge branch 'jn/web' into maint
* jn/web:
gitweb: No difftree output for trivial merge
gitweb: Remove parse_from_to_diffinfo code from git_patchset_body
-rwxr-xr-x | gitweb/gitweb.perl | 38 |
1 files changed, 2 insertions, 36 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index b2bae1b250..3064298f28 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" . @@ -3191,44 +3191,10 @@ sub git_patchset_body { } } until (!defined $to_name || $to_name eq $diffinfo->{'to_file'} || $patch_idx > $#$difftree); + # modifies %from, %to hashes parse_from_to_diffinfo($diffinfo, \%from, \%to, @hash_parents); - if ($diffinfo->{'nparents'}) { - # combined diff - $from{'file'} = []; - $from{'href'} = []; - fill_from_file_info($diffinfo, @hash_parents) - unless exists $diffinfo->{'from_file'}; - for (my $i = 0; $i < $diffinfo->{'nparents'}; $i++) { - $from{'file'}[$i] = $diffinfo->{'from_file'}[$i] || $diffinfo->{'to_file'}; - if ($diffinfo->{'status'}[$i] ne "A") { # not new (added) file - $from{'href'}[$i] = href(action=>"blob", - hash_base=>$hash_parents[$i], - hash=>$diffinfo->{'from_id'}[$i], - file_name=>$from{'file'}[$i]); - } else { - $from{'href'}[$i] = undef; - } - } - } else { - $from{'file'} = $diffinfo->{'from_file'} || $diffinfo->{'file'}; - if ($diffinfo->{'status'} ne "A") { # not new (added) file - $from{'href'} = href(action=>"blob", hash_base=>$hash_parent, - hash=>$diffinfo->{'from_id'}, - file_name=>$from{'file'}); - } else { - delete $from{'href'}; - } - } - $to{'file'} = $diffinfo->{'to_file'} || $diffinfo->{'file'}; - if (!is_deleted($diffinfo)) { # file exists in result - $to{'href'} = href(action=>"blob", hash_base=>$hash, - hash=>$diffinfo->{'to_id'}, - file_name=>$to{'file'}); - } else { - delete $to{'href'}; - } # this is first patch for raw difftree line with $patch_idx index # we index @$difftree array from 0, but number patches from 1 print "<div class=\"patch\" id=\"patch". ($patch_idx+1) ."\">\n"; |