]> git.ipfire.org Git - thirdparty/git.git/commit - advice.c
advice: update message to suggest '--sparse'
authorDerrick Stolee <dstolee@microsoft.com>
Fri, 24 Sep 2021 15:39:14 +0000 (15:39 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Sep 2021 17:31:02 +0000 (10:31 -0700)
commit6579e788c0a4b9468c5e2954a0868f9db0496e43
tree45c3cbec6276f2afdcea800939e027ee3a3fcae1
parent93d2c160411e2a3309a8e2f55eb53bd6c78b7262
advice: update message to suggest '--sparse'

The previous changes modified the behavior of 'git add', 'git rm', and
'git mv' to not adjust paths outside the sparse-checkout cone, even if
they exist in the working tree and their cache entries lack the
SKIP_WORKTREE bit. The intention is to warn users that they are doing
something potentially dangerous. The '--sparse' option was added to each
command to allow careful users the same ability they had before.

To improve the discoverability of this new functionality, add a message
to advice.updateSparsePath that mentions the existence of the option.

The previous set of changes also modified the purpose of this message to
include possibly a list of paths instead of only a list of pathspecs.
Make the warning message more clear about this new behavior.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
advice.c
t/t3602-rm-sparse-checkout.sh
t/t3705-add-sparse-checkout.sh
t/t7002-mv-sparse-checkout.sh