Skip to content

Commit ce6ab23

Browse files
committed
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
2 parents 17e785f + 66d2e04 commit ce6ab23

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

t/t1020-subdirectory.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,16 +162,20 @@ test_expect_success 'no file/rev ambiguity check inside .git' '
162162
)
163163
'
164164

165-
test_expect_success 'no file/rev ambiguity check inside a bare repo' '
165+
test_expect_success 'no file/rev ambiguity check inside a bare repo (explicit GIT_DIR)' '
166+
test_when_finished "rm -fr foo.git" &&
166167
git clone -s --bare .git foo.git &&
167168
(
168169
cd foo.git &&
170+
# older Git needed help by exporting GIT_DIR=.
171+
# to realize that it is inside a bare repository.
172+
# We keep this test around for regression testing.
169173
GIT_DIR=. git show -s HEAD
170174
)
171175
'
172176

173-
# This still does not work as it should...
174-
: test_expect_success 'no file/rev ambiguity check inside a bare repo' '
177+
test_expect_success 'no file/rev ambiguity check inside a bare repo' '
178+
test_when_finished "rm -fr foo.git" &&
175179
git clone -s --bare .git foo.git &&
176180
(
177181
cd foo.git &&
@@ -180,7 +184,6 @@ test_expect_success 'no file/rev ambiguity check inside a bare repo' '
180184
'
181185

182186
test_expect_success SYMLINKS 'detection should not be fooled by a symlink' '
183-
rm -fr foo.git &&
184187
git clone -s .git another &&
185188
ln -s another yetanother &&
186189
(

0 commit comments

Comments
 (0)