t0002: add test for enter_repo(), non-strict mode

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Sep 28, 2015 at 20:06 UTC 31041209fee1ebc6420b069e9c1e283241496545
1 file changed +18
t/t0002-gitfile.sh
+18
@@ -116,4 +116,22 @@ test_expect_success 'setup_git_dir twice in subdir' '
116 )
117 '
118
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 +
137 test_done