aboutsummaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2005-12-22 23:13:56 +0100
committerJunio C Hamano <junkio@cox.net>2005-12-24 00:21:10 -0800
commit457f06d68e427bbf4f1a921877441a622a05e5c4 (patch)
treef99c40b9328464d6f1ae4f5a386c64e8b5a0d51d /setup.c
parent2414721b194453f058079d897d13c4e377f92dc6 (diff)
downloadgit-457f06d68e427bbf4f1a921877441a622a05e5c4.tar.gz
git-457f06d68e427bbf4f1a921877441a622a05e5c4.tar.xz
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>
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/setup.c b/setup.c
index d3556edf1..36ede3d87 100644
--- a/setup.c
+++ b/setup.c
@@ -180,6 +180,8 @@ int check_repository_format_version(const char *var, const char *value)
{
if (strcmp(var, "core.repositoryformatversion") == 0)
repository_format_version = git_config_int(var, value);
+ else if (strcmp(var, "core.sharedrepository") == 0)
+ shared_repository = git_config_bool(var, value);
return 0;
}