Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-08-25 00:54:29 +0300
committerJunio C Hamano <gitster@pobox.com>2020-08-25 00:54:29 +0300
commit11f433f79c790bcb5feae71b0320161d7ab7dea7 (patch)
tree3e45944daa791896d03ab00afa52a0275c10273a /t
parent9e8c7542cb1307b0a23c8bdc2a8e039ab6f11b17 (diff)
parentab282aa548b807c022d521e83d843e4585b89dbb (diff)
Merge branch 'en/dir-nonbare-embedded'
"ls-files -o" mishandled the top-level directory of another git working tree that hangs in the current git working tree. * en/dir-nonbare-embedded: dir: avoid prematurely marking nonbare repositories as matches t3000: fix some test description typos
Diffstat (limited to 't')
-rwxr-xr-xt/t3000-ls-files-others.sh24
1 files changed, 20 insertions, 4 deletions
diff --git a/t/t3000-ls-files-others.sh b/t/t3000-ls-files-others.sh
index ffdfb16f58..740ce56eab 100755
--- a/t/t3000-ls-files-others.sh
+++ b/t/t3000-ls-files-others.sh
@@ -152,7 +152,7 @@ test_expect_success 'ls-files -o --directory with mix dir/file pathspecs' '
)
'
-test_expect_success 'ls-files --o --directory with glob filetype match' '
+test_expect_success 'ls-files -o --directory with glob filetype match' '
(
cd nested &&
@@ -168,7 +168,7 @@ test_expect_success 'ls-files --o --directory with glob filetype match' '
)
'
-test_expect_success 'ls-files --o --directory with mix of tracked states' '
+test_expect_success 'ls-files -o --directory with mix of tracked states' '
(
cd nested &&
@@ -184,7 +184,7 @@ test_expect_success 'ls-files --o --directory with mix of tracked states' '
)
'
-test_expect_success 'ls-files --o --directory with glob filetype match only' '
+test_expect_success 'ls-files -o --directory with glob filetype match only' '
(
cd nested &&
@@ -198,7 +198,7 @@ test_expect_success 'ls-files --o --directory with glob filetype match only' '
)
'
-test_expect_success 'ls-files --o --directory to get immediate paths under one dir only' '
+test_expect_success 'ls-files -o --directory to get immediate paths under one dir only' '
(
cd nested &&
@@ -212,4 +212,20 @@ test_expect_success 'ls-files --o --directory to get immediate paths under one d
)
'
+test_expect_success 'ls-files -o avoids listing untracked non-matching gitdir' '
+ test_when_finished "rm -rf nested/untracked/deep/empty" &&
+ (
+ cd nested &&
+
+ git init untracked/deep/empty &&
+ git ls-files --others "untracked/*.c" >actual &&
+
+ cat <<-EOF >expect &&
+ untracked/deep/foo.c
+ EOF
+
+ test_cmp expect actual
+ )
+'
+
test_done