Skip to content

Commit

Permalink
Merge pull request microsoft#444 from vdye/reset-upstream-changes
Browse files Browse the repository at this point in the history
Sparse Index: upstream updates to `git reset`
  • Loading branch information
vdye authored and ldennington committed Jan 20, 2022
2 parents c29e007 + 0bd23f8 commit 3c8102f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion read-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -2411,7 +2411,8 @@ int do_read_index(struct index_state *istate, const char *path, int must_exist)
* settings and other properties of the index (if necessary).
*/
prepare_repo_settings(istate->repo);
if (istate->repo->settings.command_requires_full_index)
if (!istate->repo->settings.sparse_index ||
istate->repo->settings.command_requires_full_index)
ensure_full_index(istate);
else
ensure_correct_sparsity(istate);
Expand Down

0 comments on commit 3c8102f

Please sign in to comment.