diff options
Diffstat (limited to 'builtin/reset.c')
-rw-r--r-- | builtin/reset.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/reset.c b/builtin/reset.c index 59f777a1da..75e061f5dc 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -161,7 +161,7 @@ static void update_index_from_diff(struct diff_queue_struct *q, * to properly construct the reset sparse directory. */ pos = cache_name_pos(one->path, strlen(one->path)); - if ((pos >= 0 && ce_skip_worktree(active_cache[pos])) || + if ((pos >= 0 && ce_skip_worktree(the_index.cache[pos])) || (pos < 0 && !path_in_sparse_checkout(one->path, &the_index))) ce->ce_flags |= CE_SKIP_WORKTREE; |