Skip to content

Commit 8aedbda

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 <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent d7fc0f5 commit 8aedbda

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
@@ -269,4 +269,11 @@ test_expect_success 'fail when lock is taken' '
269269
test_i18ngrep "File exists" err
270270
'
271271

272+
test_expect_success '.gitignore should not warn about cone mode' '
273+
git -C repo config --worktree core.sparseCheckoutCone true &&
274+
echo "**/bin/*" >repo/.gitignore &&
275+
git -C repo reset --hard 2>err &&
276+
test_i18ngrep ! "disabling cone patterns" err
277+
'
278+
272279
test_done

0 commit comments

Comments
 (0)