Skip to content

Commit

Permalink
sparse-checkout: cone mode should not interact with .gitignore
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
derrickstolee authored and gitster committed Nov 22, 2019
1 parent fb10ca5 commit f75a69f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions t/t1091-sparse-checkout-builtin.sh
Expand Up @@ -284,4 +284,11 @@ test_expect_success 'fail when lock is taken' '
test_i18ngrep "File exists" err
'

test_expect_success '.gitignore should not warn about cone mode' '
git -C repo config --worktree core.sparseCheckoutCone true &&
echo "**/bin/*" >repo/.gitignore &&
git -C repo reset --hard 2>err &&
test_i18ngrep ! "disabling cone patterns" err
'

test_done

0 comments on commit f75a69f

Please sign in to comment.