diff options
-rwxr-xr-x | gitweb/gitweb.perl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 3786955fca..45ac9d7121 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -3934,7 +3934,8 @@ sub git_blobdiff { # open patch output open $fd, "-|", git_cmd(), "diff-tree", '-r', @diff_opts, - '-p', $hash_parent_base, $hash_base, + '-p', ($format eq 'html' ? "--full-index" : ()), + $hash_parent_base, $hash_base, "--", (defined $file_parent ? $file_parent : ()), $file_name or die_error(undef, "Open git-diff-tree failed"); } @@ -3969,7 +3970,8 @@ sub git_blobdiff { } # open patch output - open $fd, "-|", git_cmd(), "diff", '-p', @diff_opts, + open $fd, "-|", git_cmd(), "diff", @diff_opts, + '-p', ($format eq 'html' ? "--full-index" : ()), $hash_parent, $hash, "--" or die_error(undef, "Open git-diff failed"); } else { |