@@ -4877,43 +4877,9 @@ sub git_blobdiff {
48774877 or die_error(undef , " Open git-diff-tree failed" );
48784878 }
48794879
4880- # old/legacy style URI
4881- if (!%diffinfo && # if new style URI failed
4882- defined $hash && defined $hash_parent ) {
4883- # fake git-diff-tree raw output
4884- $diffinfo {' from_mode' } = $diffinfo {' to_mode' } = " blob" ;
4885- $diffinfo {' from_id' } = $hash_parent ;
4886- $diffinfo {' to_id' } = $hash ;
4887- if (defined $file_name ) {
4888- if (defined $file_parent ) {
4889- $diffinfo {' status' } = ' 2' ;
4890- $diffinfo {' from_file' } = $file_parent ;
4891- $diffinfo {' to_file' } = $file_name ;
4892- } else { # assume not renamed
4893- $diffinfo {' status' } = ' 1' ;
4894- $diffinfo {' from_file' } = $file_name ;
4895- $diffinfo {' to_file' } = $file_name ;
4896- }
4897- } else { # no filename given
4898- $diffinfo {' status' } = ' 2' ;
4899- $diffinfo {' from_file' } = $hash_parent ;
4900- $diffinfo {' to_file' } = $hash ;
4901- }
4902-
4903- # non-textual hash id's can be cached
4904- if ($hash =~ m / ^[0-9a-fA-F] {40}$ / &&
4905- $hash_parent =~ m / ^[0-9a-fA-F] {40}$ / ) {
4906- $expires = ' +1d' ;
4907- }
4908-
4909- # open patch output
4910- open $fd , " -|" , git_cmd(), " diff" , @diff_opts ,
4911- ' -p' , ($format eq ' html' ? " --full-index" : ()),
4912- $hash_parent , $hash , " --"
4913- or die_error(undef , " Open git-diff failed" );
4914- } else {
4880+ # old/legacy style URI -- not generated anymore since 1.4.3.
4881+ if (!%diffinfo ) {
49154882 die_error(' 404 Not Found' , " Missing one of the blob diff parameters" )
4916- unless %diffinfo ;
49174883 }
49184884
49194885 # header
0 commit comments