sparse-checkout: detect short patterns
commit9e6d3e64175713bc0007f3012ea288f4dfc0a399
authorDerrick Stolee <dstolee@microsoft.com>
Fri, 24 Jan 2020 21:19:37 +0000 (24 21:19 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 Jan 2020 21:26:54 +0000 (24 13:26 -0800)
tree1117224847f0b0c6003eced2c04493a49bb5ca2c
parent41de0c6fbcc3d2544ebada3a9f26dec0f32f42de
sparse-checkout: detect short patterns

In cone mode, the shortest pattern the sparse-checkout command will
write into the sparse-checkout file is "/*". This is handled carefully
in add_pattern_to_hashsets(), so warn if any other pattern is this
short. This will assist future pattern checks by allowing us to assume
there are at least three characters in the pattern.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
dir.c
t/t1091-sparse-checkout-builtin.sh