]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
use do() instead of require() to include configuration
[Gitweb] / gitweb.perl
index 2701317afbed067c82cc1237046d6dfe429da68b51b420fc94d3f3fdde15e9be..4ed90000608e79dda4f879c789e3753fd0db7589356f9de91e4770316b4a61e4 100755 (executable)
@@ -152,7 +152,7 @@ sub feature_snapshot {
 our @diff_opts = ('-M'); # taken from git_commit
 
 our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "++GITWEB_CONFIG++";
-require $GITWEB_CONFIG if -e $GITWEB_CONFIG;
+do $GITWEB_CONFIG if -e $GITWEB_CONFIG;
 
 # version of the core git binary
 our $git_version = qx($GIT --version) =~ m/git version (.*)$/ ? $1 : "unknown";
@@ -2778,10 +2778,6 @@ sub git_blobdiff {
                        @difftree
                                or die_error('404 Not Found', "Blob diff not found");
 
-               } elsif (defined $hash) { # try to find filename from $hash
-                       if ($hash !~ /[0-9a-fA-F]{40}/) {
-                               $hash = git_to_hash($hash);
-                       }
                } elsif (defined $hash &&
                         $hash =~ /[0-9a-fA-F]{40}/) {
                        # try to find filename from $hash
This page took 0.025324 seconds and 4 git commands to generate.