diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2020-02-11 16:02:23 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-02-11 18:06:46 +0100 |
commit | 2631dc879d59aa08095bc4fb5bc9bcc491a787e9 (patch) | |
tree | c0afb9dc10413683f520aff4396c2e7d554d6b04 /Documentation/git-sparse-checkout.txt | |
parent | sparse-checkout: extract pattern update from 'set' subcommand (diff) | |
download | git-2631dc879d59aa08095bc4fb5bc9bcc491a787e9.tar.xz git-2631dc879d59aa08095bc4fb5bc9bcc491a787e9.zip |
sparse-checkout: create 'add' subcommand
When using the sparse-checkout feature, a user may want to incrementally
grow their sparse-checkout pattern set. Allow adding patterns using a
new 'add' subcommand. This is not much different from the 'set'
subcommand, because we still want to allow the '--stdin' option and
interpret inputs as directories when in cone mode and patterns
otherwise.
When in cone mode, we are growing the cone. This may actually reduce the
set of patterns when adding directory A when A/B is already a directory
in the cone. Test the different cases: siblings, parents, ancestors.
When not in cone mode, we can only assume the patterns should be
appended to the sparse-checkout file.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-sparse-checkout.txt')
-rw-r--r-- | Documentation/git-sparse-checkout.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/git-sparse-checkout.txt b/Documentation/git-sparse-checkout.txt index 0914619881..746f920d71 100644 --- a/Documentation/git-sparse-checkout.txt +++ b/Documentation/git-sparse-checkout.txt @@ -59,6 +59,13 @@ directories. The input format matches the output of `git ls-tree --name-only`. This includes interpreting pathnames that begin with a double quote (") as C-style quoted strings. +'add':: + Update the sparse-checkout file to include additional patterns. + By default, these patterns are read from the command-line arguments, + but they can be read from stdin using the `--stdin` option. When + `core.sparseCheckoutCone` is enabled, the given patterns are interpreted + as directory names as in the 'set' subcommand. + 'disable':: Disable the `core.sparseCheckout` config setting, and restore the working directory to include all files. Leaves the sparse-checkout |