aboutsummaryrefslogtreecommitdiffstats
path: root/path.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-04-13 14:12:28 -0700
committerJunio C Hamano <gitster@pobox.com>2016-04-13 14:12:28 -0700
commit907c416534dbf110a4659b64ae65806f2b1e8d4d (patch)
tree5e7b98dbbd50e7c943ae60c837db37b3dabcdf60 /path.c
parent7b0d47b3b6b5b64e02a5aa06b0452cadcdb18355 (diff)
parent274db840b48d144a8f0f8d8bd324365670c67275 (diff)
downloadgit-907c416534dbf110a4659b64ae65806f2b1e8d4d.tar.gz
Merge branch 'jk/check-repository-format'
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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/path.c b/path.c
index 969b494d72..bbaea5ab0b 100644
--- a/path.c
+++ b/path.c
@@ -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;