Skip to content

Commit 3d06c5f

Browse files
peffgitster
authored andcommitted
t0001: make symlink reinit test more careful
In the final test of t0001, we have a repo whose .git is a symlink to a directory "here", and we use "--separate-git-dir" to migrate that to a .git file pointing to a different directory. We check that the data is migrated to the new directory and that .git looks like a git-file. We also check that "here" is not a directory, which is slightly misleading. It should not be a directory, but neither should it be gone. It is the actual resting place of the git-file, and .git remains a symlink to it. Let's check that more explicitly, both to make our test more robust, and to make further cleanups in this area more obvious. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f7e8714 commit 3d06c5f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t0001-init.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ test_expect_success SYMLINKS 're-init to move gitdir symlink' '
402402
) &&
403403
echo "gitdir: `pwd`/realgitdir" >expected &&
404404
test_cmp expected newdir/.git &&
405-
test -d realgitdir/refs &&
406-
! test -d newdir/here
405+
test_cmp expected newdir/here &&
406+
test -d realgitdir/refs
407407
'
408408

409409
test_done

0 commit comments

Comments
 (0)