diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-05-02 14:24:04 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-05-02 14:24:04 -0700 |
commit | 85916549980c709ae14f8a935a5a6266a4a80b26 (patch) | |
tree | f337cf0d6cfa13156f9cbe59eab72285fda99e24 /path.c | |
parent | ffaa7c5d4f064ae2ce6b0ea906bd240810ecee86 (diff) | |
parent | 274db840b48d144a8f0f8d8bd324365670c67275 (diff) | |
download | git-85916549980c709ae14f8a935a5a6266a4a80b26.tar.gz |
Merge branch 'jk/check-repository-format' into maint
The repository set-up sequence has been streamlined (the biggest
change is that there is no longer git_config_early()), so that we
do not attempt to look into refs/* when we know we do not have a
Git repository.
* jk/check-repository-format:
verify_repository_format: mark messages for translation
setup: drop repository_format_version global
setup: unify repository version callbacks
init: use setup.c's repo version verification
setup: refactor repo format reading and verification
config: drop git_config_early
check_repository_format_gently: stop using git_config_early
lazily load core.sharedrepository
wrap shared_repository global in get/set accessors
setup: document check_repository_format()
Diffstat (limited to 'path.c')
-rw-r--r-- | path.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -702,17 +702,17 @@ static int calc_shared_perm(int mode) { int tweak; - if (shared_repository < 0) - tweak = -shared_repository; + if (get_shared_repository() < 0) + tweak = -get_shared_repository(); else - tweak = shared_repository; + tweak = get_shared_repository(); if (!(mode & S_IWUSR)) tweak &= ~0222; if (mode & S_IXUSR) /* Copy read bits to execute bits */ tweak |= (tweak & 0444) >> 2; - if (shared_repository < 0) + if (get_shared_repository() < 0) mode = (mode & ~0777) | tweak; else mode |= tweak; @@ -725,7 +725,7 @@ int adjust_shared_perm(const char *path) { int old_mode, new_mode; - if (!shared_repository) + if (!get_shared_repository()) return 0; if (get_st_mode_bits(path, &old_mode) < 0) return -1; |