summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-02-03 22:16:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-02-03 22:16:07 (GMT)
commitad25723e69606d9f4f3596eeb427fde3abee76c3 (patch)
treec02dbf8b2fdc076220de3862410b4cef5cb2078f /t
parent48c39e98c6aff98b5dd165435373e517780302ad (diff)
parenta2d5156c2b0e6dbffc216b4a673156487a2f8b65 (diff)
downloadgit-ad25723e69606d9f4f3596eeb427fde3abee76c3.zip
git-ad25723e69606d9f4f3596eeb427fde3abee76c3.tar.gz
git-ad25723e69606d9f4f3596eeb427fde3abee76c3.tar.bz2
Merge branch 'jk/ref-cache-non-repository-optim'
The underlying machinery used by "ls-files -o" and other commands have been taught not to create empty submodule ref cache for a directory that is not a submodule. This removes a ton of wasted CPU cycles. * jk/ref-cache-non-repository-optim: resolve_gitlink_ref: ignore non-repository paths clean: make is_git_repository a public function
Diffstat (limited to 't')
-rwxr-xr-xt/perf/p7300-clean.sh4
-rwxr-xr-xt/t3000-ls-files-others.sh7
2 files changed, 11 insertions, 0 deletions
diff --git a/t/perf/p7300-clean.sh b/t/perf/p7300-clean.sh
index ec94cdd..7c1888a 100755
--- a/t/perf/p7300-clean.sh
+++ b/t/perf/p7300-clean.sh
@@ -28,4 +28,8 @@ test_perf 'clean many untracked sub dirs, ignore nested git' '
git clean -n -q -f -f -d 100000_sub_dirs/
'
+test_perf 'ls-files -o' '
+ git ls-files -o
+'
+
test_done
diff --git a/t/t3000-ls-files-others.sh b/t/t3000-ls-files-others.sh
index 88be904..c525656 100755
--- a/t/t3000-ls-files-others.sh
+++ b/t/t3000-ls-files-others.sh
@@ -65,6 +65,13 @@ 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 &&