Merge branch 'gc/gitweb-filetest-acl'
authorJunio C Hamano <gitster@pobox.com>
Mon, 6 Nov 2017 05:24:30 +0000 (14:24 +0900)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Nov 2017 05:24:30 +0000 (14:24 +0900)
"gitweb" checks if a directory is searchable with Perl's "-x"
operator, which can be enhanced by using "filetest 'access'"
pragma, which now we do.

* gc/gitweb-filetest-acl:
gitweb: use filetest to allow ACLs

1  2 
gitweb/gitweb.perl
diff --combined gitweb/gitweb.perl
index 959f04b494e610258488867aa7de013a3477e5fc,6ac49eaf3e6477eb9eddaeec81a39db11f586551..2417057f2bc61a98e68dc6c817e456a21bf6044e
@@@ -10,6 -10,8 +10,8 @@@
  use 5.008;
  use strict;
  use warnings;
+ # handle ACL in file access tests
+ use filetest 'access';
  use CGI qw(:standard :escapeHTML -nosticky);
  use CGI::Util qw(unescape);
  use CGI::Carp qw(fatalsToBrowser set_message);
@@@ -5967,9 -5969,6 +5969,9 @@@ sub git_history_body 
                      $cgi->a({-href => href(action=>"commitdiff", hash=>$commit)}, "commitdiff");
  
                if ($ftype eq 'blob') {
 +                      print " | " .
 +                            $cgi->a({-href => href(action=>"blob_plain", hash_base=>$commit, file_name=>$file_name)}, "raw");
 +
                        my $blob_current = $file_hash;
                        my $blob_parent  = git_get_hash_by_path($commit, $file_name);
                        if (defined $blob_current && defined $blob_parent &&