Re: [PATCH] Implement selectable group ownership in git-init
From: Francesco Pretto <hidden>
Date: 2016-06-15 22:43:46
2007/11/3, Francesco Pretto [off-list ref]:
Rationale ...
Just to point, I wrote this patch for usability purpose and because i
think git still need a strong imprinting about its correct usage
pattern (i've read around that people using it with shared
repositories are already having problems with file permissions,
wrongly thinking it's inflexible for their needs). If you stand with
my reasoning, please help me to integrate this patch :-), I have other
ideas following this. NB: i'm not a C developer (that was my first
patch in pure C), have mercy...
The function adjust_shared_perm is used in other places: is there
other git commands that maybe needs to create files/dirs of a specific
group (not being in a g+sx dir)? Hopefully not, but i don't know git
source much. These are the occurrences (with the exclusion of
builtin-init-db.c):
refs.c: adjust_shared_perm(log_file);
refs.c: if (adjust_shared_perm(git_HEAD)) {
..
builtin-pack-objects.c: return adjust_shared_perm(path);
...
builtin-rerere.c: (mkdir(rr_cache, 0777) ||
adjust_shared_perm(rr_cache)))
...
lockfile.c: if (adjust_shared_perm(lk->filename))
...
sha1_file.c: else if (adjust_shared_perm(path)) {