aboutsummaryrefslogtreecommitdiffstats
path: root/sparse-index.c
diff options
context:
space:
mode:
authorDerrick Stolee <stolee@gmail.com>2025-09-12 10:30:10 +0000
committerJunio C Hamano <gitster@pobox.com>2025-09-15 12:10:57 -0700
commit66c11bd46a29f8f91297eaf6157be912bd0bf12a (patch)
treea167c53ab2e4ebd535be5258cf21d12cb25e1c9a /sparse-index.c
parentsparse-checkout: add --verbose option to 'clean' (diff)
downloadgit-66c11bd46a29f8f91297eaf6157be912bd0bf12a.tar.gz
git-66c11bd46a29f8f91297eaf6157be912bd0bf12a.zip
sparse-index: point users to new 'clean' action
In my experience, the most-common reason that the sparse index must expand to a full one is because there is some leftover file in a tracked directory that is now outside of the sparse-checkout. The new 'git sparse-checkout clean' command will find and delete these directories, so point users to it when they hit the sparse index expansion advice. Signed-off-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sparse-index.c')
-rw-r--r--sparse-index.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sparse-index.c b/sparse-index.c
index 5634abafaa..5d14795063 100644
--- a/sparse-index.c
+++ b/sparse-index.c
@@ -32,7 +32,8 @@ int give_advice_on_expansion = 1;
"Your working directory likely has contents that are outside of\n" \
"your sparse-checkout patterns. Use 'git sparse-checkout list' to\n" \
"see your sparse-checkout definition and compare it to your working\n" \
- "directory contents. Running 'git clean' may assist in this cleanup."
+ "directory contents. Running 'git sparse-checkout clean' may assist\n" \
+ "in this cleanup."
struct modify_index_context {
struct index_state *write;