From 835252272e0192bd26983e22428480c5c89775fb Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 11 Jul 2007 15:18:17 +0100 Subject: Fix core.sharedRepository = 2 For compatibility reasons, "git init --shared=all" does not write "all" into the config, but a number. In the shared setup, you really have to support even older clients on the _same_ repository. But git_config_perm() did not pick up on it. Also, "git update-server-info" failed to pick up on the shared permissions. This patch fixes both issues, and adds a test to prove it. Signed-off-by: Johannes Schindelin Tested-by: martin f krafft Signed-off-by: Junio C Hamano --- setup.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'setup.c') diff --git a/setup.c b/setup.c index bb26f3af9..7b07144af 100644 --- a/setup.c +++ b/setup.c @@ -364,6 +364,7 @@ const char *setup_git_directory_gently(int *nongit_ok) int git_config_perm(const char *var, const char *value) { if (value) { + int i; if (!strcmp(value, "umask")) return PERM_UMASK; if (!strcmp(value, "group")) @@ -372,6 +373,9 @@ int git_config_perm(const char *var, const char *value) !strcmp(value, "world") || !strcmp(value, "everybody")) return PERM_EVERYBODY; + i = atoi(value); + if (i > 1) + return i; } return git_config_bool(var, value); } -- cgit v1.2.1