diff options
Diffstat (limited to 'sparse-index.c')
| -rw-r--r-- | sparse-index.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sparse-index.c b/sparse-index.c index 147a13386a..e48e40cae7 100644 --- a/sparse-index.c +++ b/sparse-index.c @@ -1,4 +1,8 @@ -#include "cache.h" +#include "git-compat-util.h" +#include "environment.h" +#include "gettext.h" +#include "name-hash.h" +#include "read-cache-ll.h" #include "repository.h" #include "sparse-index.h" #include "tree.h" @@ -7,7 +11,7 @@ #include "cache-tree.h" #include "config.h" #include "dir.h" -#include "fsmonitor.h" +#include "fsmonitor-ll.h" struct modify_index_context { struct index_state *write; @@ -387,7 +391,7 @@ void expand_index(struct index_state *istate, struct pattern_list *pl) strbuf_setlen(&base, 0); strbuf_add(&base, ce->name, strlen(ce->name)); - read_tree_at(istate->repo, tree, &base, &ps, + read_tree_at(istate->repo, tree, &base, 0, &ps, add_path_to_index, &ctx); /* free directory entries. full entries are re-used */ @@ -575,8 +579,9 @@ void expand_to_path(struct index_state *istate, replace++; temp = *replace; *replace = '\0'; + substr_len = replace - path_mutable.buf; if (index_file_exists(istate, path_mutable.buf, - path_mutable.len, icase)) { + substr_len, icase)) { /* * We found a parent directory in the name-hash * hashtable, because only sparse directory entries @@ -589,7 +594,6 @@ void expand_to_path(struct index_state *istate, } *replace = temp; - substr_len = replace - path_mutable.buf; } cleanup: |
