Introduce core.sharedrepository
If the config variable 'core.sharedrepository' is set, the directories $GIT_DIR/objects/ $GIT_DIR/objects/?? $GIT_DIR/objects/pack $GIT_DIR/refs $GIT_DIR/refs/heads $GIT_DIR/refs/heads/tags are set group writable (and g+s, since the git group may be not the primary group of all users). Since all files are written as lock files first, and then moved to their destination, they do not have to be group writable. Indeed, if this leads to problems you found a bug. Note that -- as in my first attempt -- the config variable is set in the function which checks the repository format. If this were done in git_default_config instead, a lot of programs would need to be modified to call git_config(git_default_config) first. [jc: git variables should be in environment.c unless there is a compelling reason to do otherwise.] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
2414721b19
commit
457f06d68e
2
cache.h
2
cache.h
@ -159,6 +159,7 @@ extern void rollback_index_file(struct cache_file *);
|
||||
extern int trust_executable_bit;
|
||||
extern int only_use_symrefs;
|
||||
extern int diff_rename_limit_default;
|
||||
extern int shared_repository;
|
||||
|
||||
#define GIT_REPO_VERSION 0
|
||||
extern int repository_format_version;
|
||||
@ -183,6 +184,7 @@ extern const unsigned char null_sha1[20];
|
||||
|
||||
int git_mkstemp(char *path, size_t n, const char *template);
|
||||
|
||||
int adjust_shared_perm(const char *path);
|
||||
int safe_create_leading_directories(char *path);
|
||||
char *safe_strncpy(char *, const char *, size_t);
|
||||
char *enter_repo(char *path, int strict);
|
||||
|
Reference in New Issue
Block a user