summaryrefslogtreecommitdiffstats
path: root/builtin/clean.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-02-18 01:25:05 +0100
committerJunio C Hamano <gitster@pobox.com>2022-02-18 01:25:05 +0100
commit2f45f3e2bc859e5d5d29ede28de14f073c2dc227 (patch)
tree5ee746acec3fe482534dbb4c7c8b21c251b47115 /builtin/clean.c
parentMerge branch 'jz/rev-list-exclude-first-parent-only' (diff)
parentupdate-index: reduce scope of index expansion in do_reupdate (diff)
downloadgit-2f45f3e2bc859e5d5d29ede28de14f073c2dc227.tar.xz
git-2f45f3e2bc859e5d5d29ede28de14f073c2dc227.zip
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
Diffstat (limited to 'builtin/clean.c')
-rw-r--r--builtin/clean.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/clean.c b/builtin/clean.c
index 3ff02bbbff..5466636e66 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -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"));