summaryrefslogtreecommitdiffstats
path: root/sparse-index.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-10-02 16:46:24 +0200
committerJunio C Hamano <gitster@pobox.com>2024-10-02 16:46:25 +0200
commit9293a931868f21029baf55935f2f092c3f06415f (patch)
tree1b7b2551124cf83a4c52ce01b8f1bbe8d85c4cda /sparse-index.c
parentanother batch after 2.47-rc0 (diff)
parentsparse-checkout: disable advice in 'disable' (diff)
downloadgit-9293a931868f21029baf55935f2f092c3f06415f.tar.xz
git-9293a931868f21029baf55935f2f092c3f06415f.zip
Merge branch 'ds/sparse-checkout-expansion-advice'
When "git sparse-checkout disable" turns a sparse checkout into a regular checkout, the index is fully expanded. This totally expected behaviour however had an "oops, we are expanding the index" advice message, which has been corrected. * ds/sparse-checkout-expansion-advice: sparse-checkout: disable advice in 'disable'
Diffstat (limited to 'sparse-index.c')
-rw-r--r--sparse-index.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sparse-index.c b/sparse-index.c
index 542ca5f411..3d7f2164e2 100644
--- a/sparse-index.c
+++ b/sparse-index.c
@@ -21,9 +21,10 @@
* advice for advice.sparseIndexExpanded when expanding a sparse index to a full
* one. However, this is sometimes done on purpose, such as in the sparse-checkout
* builtin, even when index.sparse=false. This may be disabled in
- * convert_to_sparse().
+ * convert_to_sparse() or by commands that know they will lead to a full
+ * expansion, but this message is not actionable.
*/
-static int give_advice_on_expansion = 1;
+int give_advice_on_expansion = 1;
#define ADVICE_MSG \
"The sparse index is expanding to a full index, a slow operation.\n" \
"Your working directory likely has contents that are outside of\n" \