]> git.ipfire.org Git - thirdparty/git.git/commit - path.c
path: optimize common dir checking
authorDavid Turner <dturner@twopensource.com>
Tue, 1 Sep 2015 02:13:10 +0000 (22:13 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 1 Sep 2015 17:37:38 +0000 (10:37 -0700)
commit4e09cf2acf00c63848c365479c61d80af62eceba
tree814365371ed1ed3a1d019e31b5d4db7e77973ba5
parent0701530c2663f82ff4b678de27db4c61f8b3092f
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>
path.c
t/t0060-path-utils.sh