@@ -65,13 +65,6 @@ test_expect_success '--no-empty-directory hides empty directory' '
test_cmp expected3 output
'
-test_expect_success 'ls-files --others handles non-submodule .git' '
- mkdir not-a-submodule &&
- echo foo >not-a-submodule/.git &&
- git ls-files -o >output &&
- test_cmp expected1 output
-'
-
test_expect_success SYMLINKS 'ls-files --others with symlinked submodule' '
git init super &&
git init sub &&
new file mode 100755
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+test_description='test git ls-files --others with non-submodule repositories'
+
+. ./test-lib.sh
+
+test_expect_success 'setup: expected output' '
+ cat >expected <<-EOF
+ expected
+ output
+ EOF
+'
+
+test_expect_success 'ls-files --others handles non-submodule .git' '
+ mkdir not-a-submodule &&
+ echo foo >not-a-submodule/.git &&
+ git ls-files -o >output &&
+ test_cmp expected output
+'
+
+test_done
a2d5156c2b (resolve_gitlink_ref: ignore non-repository paths, 2016-01-22) added a test to t3000-ls-files-others.sh to check that 'ls-files -o' does not die() when given a subdirectory that looks like a repository but is actually a subdirectory containing a bogus .git file. Move this test to a separate file in preparation for testing scenarios with non-submodule repositories that are not bogus. Signed-off-by: Kyle Meyer <kyle@kyleam.com> --- t/t3000-ls-files-others.sh | 7 ------- t/t3009-ls-files-others-nonsubmodule.sh | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 7 deletions(-) create mode 100755 t/t3009-ls-files-others-nonsubmodule.sh