diff options
author | Elijah Newren <newren@gmail.com> | 2023-12-03 05:57:02 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-12-03 15:25:14 +0900 |
commit | 253eeaf7a2bc93285b55e2be8aa15f27cd11858e (patch) | |
tree | 916ca1e3aa778db1eb534ecad8262e39701fff53 /builtin/commit-graph.c | |
parent | 6b7f56f7ef7aa394d07ff99deff7740f4f3e04a3 (diff) |
completion: fix logic for determining whether cone mode is active
_git_sparse_checkout() was checking whether we were in cone mode by
checking whether either:
A) core.sparseCheckoutCone was "true"
B) "--cone" was specified on the command line
This code has 2 bugs I didn't catch in my review at the time
1) core.sparseCheckout must be "true" for core.sparseCheckoutCone to
be relevant (which matters since "git sparse-checkout disable"
only unsets core.sparseCheckout, not core.sparseCheckoutCone)
2) The presence of "--no-cone" should override any config setting
Further, I forgot to update this logic as part of 2d95707a02
("sparse-checkout: make --cone the default", 2022-04-22) for the new
default.
Update the code for the new default and make it be more careful in
determining whether to complete based on cone mode or non-cone mode.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions