Git 2.5.6
[gitweb.git] / t / t0002-gitfile.sh
index 37e9396e5dae8957ba73507018d5c334ee65e30d..9393322c3e7028ea7074d2b1ec50fbb293c6728f 100755 (executable)
@@ -99,4 +99,21 @@ test_expect_success 'check rev-list' '
        test "$SHA" = "$(git rev-list HEAD)"
 '
 
+test_expect_success 'setup_git_dir twice in subdir' '
+       git init sgd &&
+       (
+               cd sgd &&
+               git config alias.lsfi ls-files &&
+               mv .git .realgit &&
+               echo "gitdir: .realgit" >.git &&
+               mkdir subdir &&
+               cd subdir &&
+               >foo &&
+               git add foo &&
+               git lsfi >actual &&
+               echo foo >expected &&
+               test_cmp expected actual
+       )
+'
+
 test_done