@@ -4926,43 +4926,9 @@ sub git_blobdiff {
49264926 or die_error(undef , " Open git-diff-tree failed" );
49274927 }
49284928
4929- # old/legacy style URI
4930- if (!%diffinfo && # if new style URI failed
4931- defined $hash && defined $hash_parent ) {
4932- # fake git-diff-tree raw output
4933- $diffinfo {' from_mode' } = $diffinfo {' to_mode' } = " blob" ;
4934- $diffinfo {' from_id' } = $hash_parent ;
4935- $diffinfo {' to_id' } = $hash ;
4936- if (defined $file_name ) {
4937- if (defined $file_parent ) {
4938- $diffinfo {' status' } = ' 2' ;
4939- $diffinfo {' from_file' } = $file_parent ;
4940- $diffinfo {' to_file' } = $file_name ;
4941- } else { # assume not renamed
4942- $diffinfo {' status' } = ' 1' ;
4943- $diffinfo {' from_file' } = $file_name ;
4944- $diffinfo {' to_file' } = $file_name ;
4945- }
4946- } else { # no filename given
4947- $diffinfo {' status' } = ' 2' ;
4948- $diffinfo {' from_file' } = $hash_parent ;
4949- $diffinfo {' to_file' } = $hash ;
4950- }
4951-
4952- # non-textual hash id's can be cached
4953- if ($hash =~ m / ^[0-9a-fA-F] {40}$ / &&
4954- $hash_parent =~ m / ^[0-9a-fA-F] {40}$ / ) {
4955- $expires = ' +1d' ;
4956- }
4957-
4958- # open patch output
4959- open $fd , " -|" , git_cmd(), " diff" , @diff_opts ,
4960- ' -p' , ($format eq ' html' ? " --full-index" : ()),
4961- $hash_parent , $hash , " --"
4962- or die_error(undef , " Open git-diff failed" );
4963- } else {
4929+ # old/legacy style URI -- not generated anymore since 1.4.3.
4930+ if (!%diffinfo ) {
49644931 die_error(' 404 Not Found' , " Missing one of the blob diff parameters" )
4965- unless %diffinfo ;
49664932 }
49674933
49684934 # header
0 commit comments