diff options
| author | Derrick Stolee <stolee@gmail.com> | 2024-09-23 19:31:22 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-09-23 13:19:01 -0700 |
| commit | 537e516a39a760fddc4f3f5020c4118943f6c146 (patch) | |
| tree | b1c81e108e7fdc8c2933c5baf46bbafa3d2b7b62 /sparse-index.h | |
| parent | Git 2.46.2 (diff) | |
| download | git-537e516a39a760fddc4f3f5020c4118943f6c146.tar.gz git-537e516a39a760fddc4f3f5020c4118943f6c146.zip | |
sparse-checkout: disable advice in 'disable'
When running 'git sparse-checkout disable' with the sparse index
enabled, Git is expected to expand the index into a full index. However,
it currently outputs the advice message saying that that is unexpected
and likely due to an issue with the working directory.
Disable this advice message when in this code path. Establish a pattern
for doing a similar removal in the future.
Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sparse-index.h')
| -rw-r--r-- | sparse-index.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sparse-index.h b/sparse-index.h index a16f3e67d7..727034be7c 100644 --- a/sparse-index.h +++ b/sparse-index.h @@ -1,6 +1,13 @@ #ifndef SPARSE_INDEX_H__ #define SPARSE_INDEX_H__ +/* + * If performing an operation where the index is supposed to expand to a + * full index, then disable the advice message by setting this global to + * zero. + */ +extern int give_advice_on_expansion; + struct index_state; #define SPARSE_INDEX_MEMORY_ONLY (1 << 0) int is_sparse_index_allowed(struct index_state *istate, int flags); |
