summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-05-11 01:34:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-05-11 01:34:03 (GMT)
commitd92f84461033b6ca3e19e31d30e5524bd25346ee (patch)
tree02168f21f10b22b5625a11ca1ec09aee9addc87a /t
parent73d419558d9fa4de3be28bd58158636bc739808e (diff)
parent87a074df2455f305df8facc22e85dac1cfeb0d6b (diff)
downloadgit-d92f84461033b6ca3e19e31d30e5524bd25346ee.zip
git-d92f84461033b6ca3e19e31d30e5524bd25346ee.tar.gz
git-d92f84461033b6ca3e19e31d30e5524bd25346ee.tar.bz2
Merge branch 'maint'
* maint: handle "git --bare init <dir>" properly
Diffstat (limited to 't')
-rwxr-xr-xt/t0001-init.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index 6757734..7c0a698 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