Skip to content

Commit 20e7bd3

Browse files
derrickstoleegitster
authored andcommitted
sparse-checkout: cone mode should not interact with .gitignore
During the development of the sparse-checkout "cone mode" feature, an incorrect placement of the initializer for "use_cone_patterns = 1" caused warnings to show up when a .gitignore file was present with non-cone-mode patterns. This was fixed in the original commit introducing the cone mode, but now we should add a test to avoid hitting this problem again in the future. Signed-off-by: Derrick Stolee <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a879c5b commit 20e7bd3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

t/t1091-sparse-checkout-builtin.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,4 +283,11 @@ test_expect_success 'fail when lock is taken' '
283283
test_i18ngrep "File exists" err
284284
'
285285

286+
test_expect_success '.gitignore should not warn about cone mode' '
287+
git -C repo config --worktree core.sparseCheckoutCone true &&
288+
echo "**/bin/*" >repo/.gitignore &&
289+
git -C repo reset --hard 2>err &&
290+
test_i18ngrep ! "disabling cone patterns" err
291+
'
292+
286293
test_done

0 commit comments

Comments
 (0)