gitweb/gitweb_config.perl: allow replace refs in gitweb
commitbf8567afc1b5449a1158a10bc60020309e662dd6
authorKyle J. McKay <mackyle@gmail.com>
Fri, 29 Jan 2021 04:07:24 +0000 (28 21:07 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Fri, 29 Jan 2021 04:07:24 +0000 (28 21:07 -0700)
treef43ad013b59630deb4e1fb408ef90b1f7efa5bb3
parent57b83ea8af21886bcfded97d7198150e13953f32
gitweb/gitweb_config.perl: allow replace refs in gitweb

Although the rest of Girocco tries very carefully to avoid being
misled by any "replace" refs by making sure GIT_NO_REPLACE_OBJECTS
has been set to "1" and exported into the environment, that's not
really the best user experience when browsing the repository via
gitweb.

Since gitweb picks up the standard Girocco environment configuration
via Girocco::Config and that *does* always set GIT_NO_REPLACE_REFS=1,
gitweb has been running in a mode where it ignores all replace refs
(if any are present).

Remedy this by adding a little bit extra to gitweb/gitweb_config.perl
to remove the GIT_NO_REPLACE_REFS=1 setting from the environment.

With this change, gitweb now takes into account any replace refs
(refs/replace/*) that may be present in the repository.

Note that since git-browser never uses Girocco::Config, it has always
been showing the graph with the effect of any replace refs present.

Now gitweb's display will match that of git-browser's and be less of
a surprise when replace refs are present in a repository.

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