diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-11-21 14:39:03 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-21 14:39:03 +0300 |
commit | 9fc9555312ea90d4e80cee17478f1d12ec976d19 (patch) | |
tree | 280e5e6a35f7be808cb2b9154264c7e575598e49 /read-cache.c | |
parent | 9da9fff14d82e1ce055b664f276a5a96d2f5e946 (diff) | |
parent | c9d6c78870defec48dfa8bc1fd37ea51379e737d (diff) |
Merge branch 'cc/shared-index-permbits'
The way .git/index and .git/sharedindex* files were initially
created gave these files different perm bits until they were
adjusted for shared repository settings. This was made consistent.
* cc/shared-index-permbits:
read-cache: make the split index obey umask settings
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/read-cache.c b/read-cache.c index 42de59a163..bd45dc3e24 100644 --- a/read-cache.c +++ b/read-cache.c @@ -3179,7 +3179,8 @@ int write_locked_index(struct index_state *istate, struct lock_file *lock, struct tempfile *temp; int saved_errno; - temp = mks_tempfile(git_path("sharedindex_XXXXXX")); + /* Same initial permissions as the main .git/index file */ + temp = mks_tempfile_sm(git_path("sharedindex_XXXXXX"), 0, 0666); if (!temp) { oidclr(&si->base_oid); ret = do_write_locked_index(istate, lock, flags); |