Skip to content

Commit 3104120

Browse files
pcloudsgitster
authored andcommitted
t0002: add test for enter_repo(), non-strict mode
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1fb5925 commit 3104120

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

t/t0002-gitfile.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,22 @@ test_expect_success 'setup_git_dir twice in subdir' '
116116
)
117117
'
118118

119+
test_expect_success 'enter_repo non-strict mode' '
120+
test_create_repo enter_repo &&
121+
(
122+
cd enter_repo &&
123+
test_tick &&
124+
test_commit foo &&
125+
mv .git .realgit &&
126+
echo "gitdir: .realgit" >.git
127+
) &&
128+
git ls-remote enter_repo >actual &&
129+
cat >expected <<-\EOF &&
130+
946e985ab20de757ca5b872b16d64e92ff3803a9 HEAD
131+
946e985ab20de757ca5b872b16d64e92ff3803a9 refs/heads/master
132+
946e985ab20de757ca5b872b16d64e92ff3803a9 refs/tags/foo
133+
EOF
134+
test_cmp expected actual
135+
'
136+
119137
test_done

0 commit comments

Comments
 (0)