diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2008-10-08 08:05:43 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2008-10-08 08:05:43 -0700 |
commit | c4f6a48969b33e7fec8fce592e38a60849782d2a (patch) | |
tree | b80cf97c8a44782c982a7aa1181f2da3f602aaf3 /t | |
parent | 19d4b416f429ac2d3f4c225aaf1af8761bcb03dd (diff) | |
parent | fb7424363643d6049faf3bda399e5e602782b5b7 (diff) | |
download | git-c4f6a48969b33e7fec8fce592e38a60849782d2a.tar.gz git-c4f6a48969b33e7fec8fce592e38a60849782d2a.tar.xz |
Merge branch 'maint'
* maint:
Do not use errno when pread() returns 0
git init: --bare/--shared overrides system/global config
git-push.txt: Describe --repo option in more detail
git rm: refresh index before up-to-date check
Fix a few typos in relnotes
Diffstat (limited to 't')
-rwxr-xr-x | t/t0001-init.sh | 32 | ||||
-rwxr-xr-x | t/t3600-rm.sh | 25 |
2 files changed, 49 insertions, 8 deletions
diff --git a/t/t0001-init.sh b/t/t0001-init.sh index 620da5b32..5ac0a273a 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -167,4 +167,36 @@ test_expect_success 'init with --template (blank)' ' ! test -f template-blank/.git/info/exclude ' +test_expect_success 'init --bare/--shared overrides system/global config' ' + ( + HOME="`pwd`" && + export HOME && + test_config="$HOME"/.gitconfig && + unset GIT_CONFIG_NOGLOBAL && + git config -f "$test_config" core.bare false && + git config -f "$test_config" core.sharedRepository 0640 && + mkdir init-bare-shared-override && + cd init-bare-shared-override && + git init --bare --shared=0666 + ) && + check_config init-bare-shared-override true unset && + test x0666 = \ + x`git config -f init-bare-shared-override/config core.sharedRepository` +' + +test_expect_success 'init honors global core.sharedRepository' ' + ( + HOME="`pwd`" && + export HOME && + test_config="$HOME"/.gitconfig && + unset GIT_CONFIG_NOGLOBAL && + git config -f "$test_config" core.sharedRepository 0666 && + mkdir shared-honor-global && + cd shared-honor-global && + git init + ) && + test x0666 = \ + x`git config -f shared-honor-global/.git/config core.sharedRepository` +' + test_done diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh index 558c80edb..66aca99fd 100755 --- a/t/t3600-rm.sh +++ b/t/t3600-rm.sh @@ -219,14 +219,23 @@ test_expect_success 'Remove nonexistent file returns nonzero exit status' ' test_expect_success 'Call "rm" from outside the work tree' ' mkdir repo && - cd repo && - git init && - echo something > somefile && - git add somefile && - git commit -m "add a file" && - (cd .. && - git --git-dir=repo/.git --work-tree=repo rm somefile) && - test_must_fail git ls-files --error-unmatch somefile + (cd repo && + git init && + echo something > somefile && + git add somefile && + git commit -m "add a file" && + (cd .. && + git --git-dir=repo/.git --work-tree=repo rm somefile) && + test_must_fail git ls-files --error-unmatch somefile) +' + +test_expect_success 'refresh index before checking if it is up-to-date' ' + + git reset --hard && + test-chmtime -86400 frotz/nitfol && + git rm frotz/nitfol && + test ! -f frotz/nitfol + ' test_done |