Merge branch 'ea/blame-progress'
[gitweb.git] / t / t0002-gitfile.sh
index 545bfe29828fb264404d0663f85e173e160b25a0..3afe0125c99f037b9f144806c00435dcba3f93ea 100755 (executable)
@@ -99,7 +99,7 @@ test_expect_success 'check rev-list' '
        test "$SHA" = "$(git rev-list HEAD)"
 '
 
-test_expect_success 'setup_git_dir twice in subdir' '
+test_expect_failure 'setup_git_dir twice in subdir' '
        git init sgd &&
        (
                cd sgd &&
@@ -134,4 +134,28 @@ test_expect_success 'enter_repo non-strict mode' '
        test_cmp expected actual
 '
 
+test_expect_success 'enter_repo linked checkout' '
+       (
+               cd enter_repo &&
+               git worktree add  ../foo refs/tags/foo
+       ) &&
+       git ls-remote foo >actual &&
+       cat >expected <<-\EOF &&
+       946e985ab20de757ca5b872b16d64e92ff3803a9        HEAD
+       946e985ab20de757ca5b872b16d64e92ff3803a9        refs/heads/master
+       946e985ab20de757ca5b872b16d64e92ff3803a9        refs/tags/foo
+       EOF
+       test_cmp expected actual
+'
+
+test_expect_success 'enter_repo strict mode' '
+       git ls-remote --upload-pack="git upload-pack --strict" foo/.git >actual &&
+       cat >expected <<-\EOF &&
+       946e985ab20de757ca5b872b16d64e92ff3803a9        HEAD
+       946e985ab20de757ca5b872b16d64e92ff3803a9        refs/heads/master
+       946e985ab20de757ca5b872b16d64e92ff3803a9        refs/tags/foo
+       EOF
+       test_cmp expected actual
+'
+
 test_done