aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-read-tree.txt
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-11-27 01:17:46 +0700
committerJunio C Hamano <gitster@pobox.com>2010-11-30 17:28:09 -0800
commit9037026d34907c0c94e3ab46f96068fa57da6ebc (patch)
tree420b92db44369dd874ca93b4ae3aa28da7736034 /Documentation/git-read-tree.txt
parent2431afbf1b3b986245242218b909cd9f055ba65b (diff)
downloadgit-9037026d34907c0c94e3ab46f96068fa57da6ebc.tar.gz
unpack-trees: fix sparse checkout's "unable to match directories"
Matching index entries against an excludes file currently has two problems. First, there's no function to do it. Code paths (like sparse checkout) that wanted to try it would iterate over index entries and for each index entry pass that path to excluded_from_list(). But that is not how excluded_from_list() works; one is supposed to feed in each ancester of a path before a given path to find out if it was excluded because of some parent or grandparent matching a bigsubdirectory/ pattern despite the path not matching any .gitignore pattern directly. Second, it's inefficient. The excludes mechanism is supposed to let us block off vast swaths of the filesystem as uninteresting; separately checking every index entry doesn't fit that model. Introduce a new function to take care of both these problems. This traverses the index in depth-first order (well, that's what order the index is in) to mark un-excluded entries. Maybe some day the in-core index format will be restructured to make this sort of operation easier. Or maybe we will want to try some binary search based thing. The interface is simple enough to allow all those things. Example: clear_ce_flags(the_index.cache, the_index.cache_nr, CE_CANDIDATE, CE_CLEARME, exclude_list); would clear the CE_CLEARME flag on all index entries with CE_CANDIDATE flag and not matched by exclude_list. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-read-tree.txt')
-rw-r--r--Documentation/git-read-tree.txt7
1 files changed, 0 insertions, 7 deletions
diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt
index 2e78da448f..f6037c4f6a 100644
--- a/Documentation/git-read-tree.txt
+++ b/Documentation/git-read-tree.txt
@@ -412,13 +412,6 @@ turn `core.sparseCheckout` on in order to have sparse checkout
support.
-BUGS
-----
-In order to match a directory with $GIT_DIR/info/sparse-checkout,
-trailing slash must be used. The form without trailing slash, while
-works with .gitignore, does not work with sparse checkout.
-
-
SEE ALSO
--------
linkgit:git-write-tree[1]; linkgit:git-ls-files[1];