summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-05-22 19:41:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-05-22 19:42:00 (GMT)
commitce6ab232cae58d78d26edabc12e038e6b1959796 (patch)
tree2583a9bdd4d1d34444142203b8392b894bba37ea
parent17e785f6bacee806767aee0ba48d8c76a99a9895 (diff)
parent66d2e04ec9856b5ef667f5241774749d079a5109 (diff)
downloadgit-ce6ab232cae58d78d26edabc12e038e6b1959796.zip
git-ce6ab232cae58d78d26edabc12e038e6b1959796.tar.gz
git-ce6ab232cae58d78d26edabc12e038e6b1959796.tar.bz2
Merge branch 'sb/t1020-cleanup'
There was a commented-out (instead of being marked to expect failure) test that documented a breakage that was fixed since the test was written; turn it into a proper test. * sb/t1020-cleanup: subdirectory tests: code cleanup, uncomment test
-rwxr-xr-xt/t1020-subdirectory.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh
index 2edb4f2..8e22b03 100755
--- a/t/t1020-subdirectory.sh
+++ b/t/t1020-subdirectory.sh
@@ -162,16 +162,20 @@ test_expect_success 'no file/rev ambiguity check inside .git' '
)
'
-test_expect_success 'no file/rev ambiguity check inside a bare repo' '
+test_expect_success 'no file/rev ambiguity check inside a bare repo (explicit GIT_DIR)' '
+ test_when_finished "rm -fr foo.git" &&
git clone -s --bare .git foo.git &&
(
cd foo.git &&
+ # older Git needed help by exporting GIT_DIR=.
+ # to realize that it is inside a bare repository.
+ # We keep this test around for regression testing.
GIT_DIR=. git show -s HEAD
)
'
-# This still does not work as it should...
-: test_expect_success 'no file/rev ambiguity check inside a bare repo' '
+test_expect_success 'no file/rev ambiguity check inside a bare repo' '
+ test_when_finished "rm -fr foo.git" &&
git clone -s --bare .git foo.git &&
(
cd foo.git &&
@@ -180,7 +184,6 @@ test_expect_success 'no file/rev ambiguity check inside a bare repo' '
'
test_expect_success SYMLINKS 'detection should not be fooled by a symlink' '
- rm -fr foo.git &&
git clone -s .git another &&
ln -s another yetanother &&
(