gitweb: make sure $git_dir is undef if no project
commiteded4e32ec3b052fd016a0082cb089f78059eae9
authorKyle J. McKay <mackyle@gmail.com>
Thu, 23 Apr 2015 04:48:28 +0000 (22 21:48 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Thu, 23 Apr 2015 04:48:28 +0000 (22 21:48 -0700)
tree3e921b99b121122d0d19b1298e3c191e8c9ad0a2
parent296b4db838fc7495c343547320f663aa5bfd511f
gitweb: make sure $git_dir is undef if no project

When running in FCGI mode, $git_dir could be left
set to the last project's directory, but if we are
running an action with no project (e.g. project_list)
then having it set to a project directory results in
unnecessary git commands being spawned to read the
config file.

Modify evaluate_git_dir so that it always sets $git_dir
and sets it to undef if there's no project.

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