summaryrefslogtreecommitdiff
path: root/t/t0060-path-utils.sh
diff options
context:
space:
mode:
authorDavid Turner <dturner@twopensource.com>2015-08-31 22:13:10 -0400
committerJunio C Hamano <gitster@pobox.com>2015-09-01 10:37:38 -0700
commit4e09cf2acf00c63848c365479c61d80af62eceba (patch)
tree814365371ed1ed3a1d019e31b5d4db7e77973ba5 /t/t0060-path-utils.sh
parent0701530c2663f82ff4b678de27db4c61f8b3092f (diff)
downloadgit-4e09cf2acf00c63848c365479c61d80af62eceba.tar.gz
path: optimize common dir checking
Instead of a linear search over common_list to check whether a path is common, use a trie. The trie search operates on path prefixes, and handles excludes. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0060-path-utils.sh')
-rwxr-xr-xt/t0060-path-utils.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh
index 93605f42f2..1ca49e102d 100755
--- a/t/t0060-path-utils.sh
+++ b/t/t0060-path-utils.sh
@@ -271,6 +271,7 @@ test_git_path GIT_COMMON_DIR=bar objects/bar bar/objects/bar
test_git_path GIT_COMMON_DIR=bar info/exclude bar/info/exclude
test_git_path GIT_COMMON_DIR=bar info/grafts bar/info/grafts
test_git_path GIT_COMMON_DIR=bar info/sparse-checkout .git/info/sparse-checkout
+test_git_path GIT_COMMON_DIR=bar info//sparse-checkout .git/info//sparse-checkout
test_git_path GIT_COMMON_DIR=bar remotes/bar bar/remotes/bar
test_git_path GIT_COMMON_DIR=bar branches/bar bar/branches/bar
test_git_path GIT_COMMON_DIR=bar logs/refs/heads/master bar/logs/refs/heads/master