Describe how to omit "have" lines

A new feature in Git allows for omitting "have" lines corresponding to
refs outside the current Git namespace. Explain how to enable this
feature in the INSTALL instructions and in the Git interface
documentation.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Lukas Fleischer 2015-11-14 13:39:21 +01:00
parent a114476e81
commit 002d348d90
2 changed files with 15 additions and 0 deletions

View file

@ -46,6 +46,8 @@ Setup on Arch Linux
# mkdir /srv/http/aurweb/aur.git/ # mkdir /srv/http/aurweb/aur.git/
# cd /srv/http/aurweb/aur.git/ # cd /srv/http/aurweb/aur.git/
# git init --bare # git init --bare
# git config --local transfer.hideRefs '^refs/'
# git config --local transfer.hideRefs '!refs/'
# ln -s ../../git-interface/git-update.py hooks/update # ln -s ../../git-interface/git-update.py hooks/update
# chown -R aur . # chown -R aur .

View file

@ -80,3 +80,16 @@ request.
An example configuration for nginx and fcgiwrap can be found in the INSTALL An example configuration for nginx and fcgiwrap can be found in the INSTALL
instructions in the top-level directory. instructions in the top-level directory.
Further Configuration
---------------------
When using Git namespaces, Git advertises refs outside the current namespace as
so-called "have" lines. This is normally used to reduce traffic but it has the
opposite effect in the case of aurweb: Many essentially useless lines are
transferred to the Git client during `git push` operations.
In order to omit these advertisements, add the strings "^refs/" and "!refs/" to
the transfer.hideRefs configuration setting. Note that the order of these
patterns is important ("^refs/" must come first) and that Git 2.7 or newer is
required for them to work.