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>
This commit is contained in:

committed by
Junio C Hamano

parent
4f71522dfb
commit
537e516a39
@ -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);
|
||||
|
Reference in New Issue
Block a user