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.
The repository autocreation functionality ends up sending the
stdout to the client side, and there a very confused git push
can't make any sense of the protocol.
This avoids complexity where failing to read the config file in
gitosis-run-hook is non-fatal, but only on the first run. gitosis-init
will take care of config file reading and just pass a RawConfigParser
instance to run_hook.post_update.
This is ugly and annoying but alternatives are storing generated files
in version control, or manually maintaining pesky little details.
The control file will be part of the .diff.gz.