sparse-checkout: add '--stdin' option to set subcommand

The 'git sparse-checkout set' subcommand takes a list of patterns
and places them in the sparse-checkout file. Then, it updates the
working directory to match those patterns. For a large list of
patterns, the command-line call can get very cumbersome.

Add a '--stdin' option to instead read patterns over standard in.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Derrick Stolee
2019-11-21 22:04:37 +00:00
committed by Junio C Hamano
parent f6039a9423
commit 7bffca95ea
3 changed files with 55 additions and 2 deletions

View File

@ -47,6 +47,9 @@ To avoid interfering with other worktrees, it first enables the
a list of arguments following the 'set' subcommand. Update the
working directory to match the new patterns. Enable the
core.sparseCheckout config setting if it is not already enabled.
+
When the `--stdin` option is provided, the patterns are read from
standard in as a newline-delimited list instead of from the arguments.
SPARSE CHECKOUT
---------------