summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2008-12-16 22:08:22 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-12-16 22:08:28 -0800
commitf23ffbe890d36e277f02d4a84c2b52de3a4e3173 (patch)
tree281348e9bd1853df211e24f4a47c47985ef696fc /gitweb
parentGIT 1.5.5.5 (diff)
parentGIT 1.5.4.7 (diff)
downloadtgif-f23ffbe890d36e277f02d4a84c2b52de3a4e3173.tar.xz
GIT 1.5.5.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl38
1 files changed, 2 insertions, 36 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 345acf4520..f37b687acb 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -4877,43 +4877,9 @@ sub git_blobdiff {
or die_error(undef, "Open git-diff-tree failed");
}
- # old/legacy style URI
- if (!%diffinfo && # if new style URI failed
- defined $hash && defined $hash_parent) {
- # fake git-diff-tree raw output
- $diffinfo{'from_mode'} = $diffinfo{'to_mode'} = "blob";
- $diffinfo{'from_id'} = $hash_parent;
- $diffinfo{'to_id'} = $hash;
- if (defined $file_name) {
- if (defined $file_parent) {
- $diffinfo{'status'} = '2';
- $diffinfo{'from_file'} = $file_parent;
- $diffinfo{'to_file'} = $file_name;
- } else { # assume not renamed
- $diffinfo{'status'} = '1';
- $diffinfo{'from_file'} = $file_name;
- $diffinfo{'to_file'} = $file_name;
- }
- } else { # no filename given
- $diffinfo{'status'} = '2';
- $diffinfo{'from_file'} = $hash_parent;
- $diffinfo{'to_file'} = $hash;
- }
-
- # non-textual hash id's can be cached
- if ($hash =~ m/^[0-9a-fA-F]{40}$/ &&
- $hash_parent =~ m/^[0-9a-fA-F]{40}$/) {
- $expires = '+1d';
- }
-
- # open patch output
- 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 {
+ # old/legacy style URI -- not generated anymore since 1.4.3.
+ if (!%diffinfo) {
die_error('404 Not Found', "Missing one of the blob diff parameters")
- unless %diffinfo;
}
# header