git: stop setting GIT_HTTP_USER_AGENT
commit18b972f22f4ad47545169bc2f7e4a6d035347ba3
authorKyle J. McKay <mackyle@gmail.com>
Sat, 24 Feb 2018 22:21:58 +0000 (24 14:21 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Sat, 24 Feb 2018 22:21:58 +0000 (24 14:21 -0800)
treec5b0213f1f64a1b92489ae2087f98dab4a0aa369
parent4b4f6b5e933f787c817844a31e41cf6e25db1247
git: stop setting GIT_HTTP_USER_AGENT

Instead of setting and exporting GIT_HTTP_USER_AGENT set the
$chroot/etc/girocco/.gitconfig http.userAgent config item.

Since 72bb4861f18c4d7e (user-agent: also set GIT_HTTP_USER_AGENT
when requested, 2015-02-01), Girocco has also been setting the
GIT_HTTP_USER_AGENT environment variable to provide support for
older Git versions >= 1.7.3 but < 1.7.12 that do not understand
the GIT_USER_AGENT environment variable.

Move this setting into the config item http.userAgent that's
stored in $Girocco::Config::chroot/etc/girocco/.gitconfig instead.

It will be just as effective there as it was in the environment
variable but it will no longer interfere with repository-specific
overrides of the http.userAgent setting that may be needed to
fetch from specific hosts.

As a side effect the code gets a little bit simpler too.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Girocco/Config.pm
bin/git-daemon-verify
bin/git-http-backend-verify
bin/git-shell-verify
jailsetup.sh
shlib.sh