As the only convenient way to use non-standard SSH ports with git is
via the ssh://user@host:port/path syntax, and that syntax forces
absolute urls, just force convert absolute paths to relative paths;
you'll never really want absolute paths via gitosis, anyway.
Without this, any changes to repository settings would only be
applied after one extra (non-empty) push.
Add unit test coverage for the post-update hook.
Make SSH authorized_keys path configurable, mostly for unit tests.
Warning: if your keyfiles contain more than just a-z0-9, at sign, dots
or dashes, you will likely end up cutting off your access to your
gitosis repository with this upgrade.
This fixes problems with e.g. "No such file or directory:
'/.../git/gitosis/projects.list.42.tmp'" in generate_project_list when
running gitosis-init.
Existing users need to run::
sudo install -d -m0755 -o git -g git ~git/gitosis
adjust the user and group name if necessary. Alternatively,
just rerun gitosis-init.
This allows running gitweb as a separate user without needing to allow it
read access to gitosis-admin.git. Running as separate user will still most
likely require a ``chgrp www-data`` of the relevant repositories, but
nothing not already decided public needs to be exposed.
Existing gitweb users will need to adjust their gitweb.conf to point to
the new location of the projects.list file.
Removing the old projects.list from
~git/repositories/gitosis-admin.git/projects.list is safe once gitweb
has switched to using the new location.
It changes the current directory, so it can't set --git-dir to a
(potentially) relative path. Make path absolute before using it.
This should fix post-update hook problems.
Creation is in gitosis.serve and not directly in repository.init(),
because that's the location that can tell what part of the directory
tree is allowed to be missing. Made the reconstructed git command
include the extension as that was easier to do.
haveAccess return value is now tuple, to preserve information on what
parts of the path can be missing.
gitosis-init and the post-update hook used to fail with
GitCheckoutIndexError, when run with git >=1.5.3, which made
checkout-index require GIT_WORK_TREE, jump through hoops to provide
it, but still be backwards compatible with older git.
Thanks to Garry Dolley for hunting the bug.