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
This commit is contained in:
Junio C Hamano
2018-11-21 20:39:03 +09:00
2 changed files with 22 additions and 1 deletions

View File

@ -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);