зеркало из https://github.com/microsoft/git.git
Merge branch 'jk/prune-packed-server-info'
Fix recent breakage in Git 2.2 that started creating info/refs and objects/info/packs files with permission bits tighter than user's umask. * jk/prune-packed-server-info: update-server-info: create info/* with mode 0666 t1301: set umask in reflog sharedrepository=group test
This commit is contained in:
Коммит
6d9f0c7c0d
|
@ -17,7 +17,7 @@ static int update_info_file(char *path, int (*generate)(FILE *))
|
|||
FILE *fp = NULL;
|
||||
|
||||
safe_create_leading_directories(path);
|
||||
fd = mkstemp(tmp);
|
||||
fd = git_mkstemp_mode(tmp, 0666);
|
||||
if (fd < 0)
|
||||
goto out;
|
||||
fp = fdopen(fd, "w");
|
||||
|
|
|
@ -111,7 +111,18 @@ do
|
|||
|
||||
done
|
||||
|
||||
test_expect_success POSIXPERM 'info/refs respects umask in unshared repo' '
|
||||
rm -f .git/info/refs &&
|
||||
test_unconfig core.sharedrepository &&
|
||||
umask 002 &&
|
||||
git update-server-info &&
|
||||
echo "-rw-rw-r--" >expect &&
|
||||
modebits .git/info/refs >actual &&
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' '
|
||||
umask 077 &&
|
||||
git config core.sharedRepository group &&
|
||||
git reflog expire --all &&
|
||||
actual="$(ls -l .git/logs/refs/heads/master)" &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче