running "git init --shared" on an existing repo
From: Sitaram Chamarty <hidden>
Date: 2016-06-15 22:48:28
Hi all,
If you forget to use "--shared" on your (bare) repo, and now need to
adjist it after the fact to make perms work ok, you ought to be able
to just run "git init --bare --shared" and things should be fine.
And it seems there was a beginning made. builtin/init-db.c at line 220 says:
/*
* We would have created the above under user's umask -- under
* shared-repository settings, we would need to fix them up.
*/
if (shared_repository) {
adjust_shared_perm(get_git_dir());
adjust_shared_perm(git_path("refs"));
adjust_shared_perm(git_path("refs/heads"));
adjust_shared_perm(git_path("refs/tags"));
}
Ideally, we should do the same to:
hooks
info
objects
objects/??
objects/info
objects/pack
also. The othes are easy, but does git internals have a defined way
of doing that objects/?? part or should it just be the long way (it's
been ages since I did any C but I'd be willing to try...)
--
Sitaram