gitweb: further restrict check_head_link results
commit662e1f3f8929ca46dd8d4f87c5920ac67cf993a8
authorKyle J. McKay <mackyle@gmail.com>
Sun, 14 Jun 2015 05:24:30 +0000 (13 22:24 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Sun, 14 Jun 2015 05:24:30 +0000 (13 22:24 -0700)
tree88494f6d60126c644ef043193baa44eca2274825
parent88e0d281888b78ce9f6d90c5450da832306cd13e
gitweb: further restrict check_head_link results

Require the directory containing the 'HEAD' file to also
contain both a refs/ and objects/ subdiretory just like
setup.c's is_git_directory does.

This helps eliminate false positives when scanning directories.

We ignore any GIT_OBJECT_DIRECTORY environment setting since
it's extremely unlikely that such is being used with gitweb.cgi.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
gitweb/gitweb.perl