X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=t%2Ft0001-init.sh;h=7c0a698b92696ff2bbb91e65e0a42e87f9163a1d;hb=1bdd46cd3a2fe1e0aeb965fb0edb493064e24495;hp=675773479a8c6a1791ae01eb47654f4433c30ee3;hpb=4de113cdf55631ef1f8bf34658fb647509520e8a;p=git.git diff --git a/t/t0001-init.sh b/t/t0001-init.sh index 675773479..7c0a698b9 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -310,4 +310,18 @@ test_expect_success POSIXPERM 'init notices EPERM' ' ) ' +test_expect_success 'init creates a new bare directory with global --bare' ' + rm -rf newdir && + git --bare init newdir && + test -d newdir/refs +' + +test_expect_success 'init prefers command line to GIT_DIR' ' + rm -rf newdir && + mkdir otherdir && + GIT_DIR=otherdir git --bare init newdir && + test -d newdir/refs && + ! test -d otherdir/refs +' + test_done