From: Junio C Hamano Date: Thu, 2 Feb 2017 21:36:56 +0000 (-0800) Subject: Merge branch 'mm/reset-facl-before-umask-test' X-Git-Tag: v2.12.0-rc0~16 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/f1fac407f5657ca9a8aa6d3909daa1e7e3036404?hp=-c Merge branch 'mm/reset-facl-before-umask-test' Test tweaks for those who have default ACL in their git source tree that interfere with the umask test. * mm/reset-facl-before-umask-test: t0001: don't let a default ACL interfere with the umask test --- f1fac407f5657ca9a8aa6d3909daa1e7e3036404 diff --combined t/t0001-init.sh index b8fc588b19,7bfc69784d..e424de5363 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@@ -258,6 -258,9 +258,9 @@@ test_expect_success POSIXPERM 'init cre ( # Leading directories should honor umask while # the repository itself should follow "shared" + mkdir newdir && + # Remove a default ACL if possible. + (setfacl -k newdir 2>/dev/null || true) && umask 002 && git init --bare --shared=0660 newdir/a/b/c && test_path_is_dir newdir/a/b/c/refs && @@@ -384,30 -387,4 +387,30 @@@ test_expect_success MINGW 'bare git di ! is_hidden newdir ' +test_expect_success 'remote init from does not use config from cwd' ' + rm -rf newdir && + test_config core.logallrefupdates true && + git init newdir && + echo true >expect && + git -C newdir config --bool core.logallrefupdates >actual && + test_cmp expect actual +' + +test_expect_success 're-init from a linked worktree' ' + git init main-worktree && + ( + cd main-worktree && + test_commit first && + git worktree add ../linked-worktree && + mv .git/info/exclude expected-exclude && + cp .git/config expected-config && + find .git/worktrees -print | sort >expected && + git -C ../linked-worktree init && + test_cmp expected-exclude .git/info/exclude && + test_cmp expected-config .git/config && + find .git/worktrees -print | sort >actual && + test_cmp expected actual + ) +' + test_done