aboutsummaryrefslogtreecommitdiffstats
path: root/sparse-index.c
diff options
context:
space:
mode:
Diffstat (limited to 'sparse-index.c')
-rw-r--r--sparse-index.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sparse-index.c b/sparse-index.c
index 1fdb07a9e6..e48e40cae7 100644
--- a/sparse-index.c
+++ b/sparse-index.c
@@ -391,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 */
@@ -579,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
@@ -593,7 +594,6 @@ void expand_to_path(struct index_state *istate,
}
*replace = temp;
- substr_len = replace - path_mutable.buf;
}
cleanup: