Merge branch 'ds/sparse-add'

"git sparse-checkout" learned a new "add" subcommand.

* ds/sparse-add:
  sparse-checkout: allow one-character directories in cone mode
  sparse-checkout: work with Windows paths
  sparse-checkout: create 'add' subcommand
  sparse-checkout: extract pattern update from 'set' subcommand
  sparse-checkout: extract add_patterns_from_input()
This commit is contained in:
Junio C Hamano
2020-03-05 10:43:01 -08:00
4 changed files with 201 additions and 34 deletions

2
dir.c
View File

@ -688,7 +688,7 @@ static void add_pattern_to_hashsets(struct pattern_list *pl, struct path_pattern
return;
}
if (given->patternlen <= 2 ||
if (given->patternlen < 2 ||
*given->pattern == '*' ||
strstr(given->pattern, "**")) {
/* Not a cone pattern. */