Merge branch 'vd/sparse-clean-etc'

"git update-index", "git checkout-index", and "git clean" are
taught to work better with the sparse checkout feature.

* vd/sparse-clean-etc:
  update-index: reduce scope of index expansion in do_reupdate
  update-index: integrate with sparse index
  update-index: add tests for sparse-checkout compatibility
  checkout-index: integrate with sparse index
  checkout-index: add --ignore-skip-worktree-bits option
  checkout-index: expand sparse checkout compatibility tests
  clean: integrate with sparse index
  reset: reorder wildcard pathspec conditions
  reset: fix validation in sparse index test
This commit is contained in:
Junio C Hamano
2022-02-17 16:25:05 -08:00
8 changed files with 360 additions and 17 deletions

View File

@ -1009,6 +1009,9 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
dir.flags |= DIR_KEEP_UNTRACKED_CONTENTS;
}
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;
if (read_cache() < 0)
die(_("index file corrupt"));