Skip to content

Commit

Permalink
t0002: add test for enter_repo(), non-strict mode
Browse files Browse the repository at this point in the history
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Nguyễn Thái Ngọc Duy authored and Junio C Hamano committed Sep 28, 2015
1 parent 1fb5925 commit 3104120
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions t/t0002-gitfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,22 @@ test_expect_success 'setup_git_dir twice in subdir' '
)
'

test_expect_success 'enter_repo non-strict mode' '
test_create_repo enter_repo &&
(
cd enter_repo &&
test_tick &&
test_commit foo &&
mv .git .realgit &&
echo "gitdir: .realgit" >.git
) &&
git ls-remote enter_repo >actual &&
cat >expected <<-\EOF &&
946e985ab20de757ca5b872b16d64e92ff3803a9 HEAD
946e985ab20de757ca5b872b16d64e92ff3803a9 refs/heads/master
946e985ab20de757ca5b872b16d64e92ff3803a9 refs/tags/foo
EOF
test_cmp expected actual
'

test_done

0 comments on commit 3104120

Please sign in to comment.