diff options
| author | Junio C Hamano <junkio@cox.net> | 2006-06-18 20:19:09 -0700 |
|---|---|---|
| committer | Junio C Hamano <junkio@cox.net> | 2006-06-18 20:19:09 -0700 |
| commit | d9faecac641ab31c7bfe5008f5a6dca119b79bc7 (patch) | |
| tree | e132b0d810e00c6ea2bb4ea5c8a4597ff4cb0e2a /setup.c | |
| parent | 72afd3eea6758a5ef181eaa3eef0b21639177494 (diff) | |
| parent | 94df2506edd76a886a1044376f8c99349b2f226e (diff) | |
| download | git-d9faecac641ab31c7bfe5008f5a6dca119b79bc7.tar.gz | |
Merge branch 'jc/shared'
* jc/shared:
shared repository: optionally allow reading to "others".
Diffstat (limited to 'setup.c')
| -rw-r--r-- | setup.c | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -219,12 +219,27 @@ const char *setup_git_directory_gently(int *nongit_ok) return cwd + offset; } +int git_config_perm(const char *var, const char *value) +{ + if (value) { + if (!strcmp(value, "umask")) + return PERM_UMASK; + if (!strcmp(value, "group")) + return PERM_GROUP; + if (!strcmp(value, "all") || + !strcmp(value, "world") || + !strcmp(value, "everybody")) + return PERM_EVERYBODY; + } + return git_config_bool(var, value); +} + 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); + shared_repository = git_config_perm(var, value); return 0; } |
