diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-04-11 13:54:14 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-04-11 13:54:14 -0700 |
commit | 3a9663e144bda415dcecea9f62d6da4e5affe0de (patch) | |
tree | e8a95a713c73fb05aef25b89b92a85f6e518c6ce /git-sparse-checkout.txt | |
parent | e05e18c5a8605c2e9b1c3aa79a3052a9b11339e1 (diff) | |
download | git-htmldocs-3a9663e144bda415dcecea9f62d6da4e5affe0de.tar.gz |
Autogenerated HTML docs for v2.40.0-335-g98572
Diffstat (limited to 'git-sparse-checkout.txt')
-rw-r--r-- | git-sparse-checkout.txt | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/git-sparse-checkout.txt b/git-sparse-checkout.txt index 68392d2a5..53dc17aa7 100644 --- a/git-sparse-checkout.txt +++ b/git-sparse-checkout.txt @@ -9,7 +9,7 @@ git-sparse-checkout - Reduce your working tree to a subset of tracked files SYNOPSIS -------- [verse] -'git sparse-checkout' (init | list | set | add | reapply | disable) [<options>] +'git sparse-checkout' (init | list | set | add | reapply | disable | check-rules) [<options>] DESCRIPTION @@ -135,6 +135,29 @@ paths to pass to a subsequent 'set' or 'add' command. However, the disable command, so the easy restore of calling a plain `init` decreased in utility. +'check-rules':: + Check whether sparsity rules match one or more paths. ++ +By default `check-rules` reads a list of paths from stdin and outputs only +the ones that match the current sparsity rules. The input is expected to consist +of one path per line, matching the output of `git ls-tree --name-only` including +that pathnames that begin with a double quote (") are interpreted as C-style +quoted strings. ++ +When called with the `--rules-file <file>` flag the input files are matched +against the sparse checkout rules found in `<file>` instead of the current ones. +The rules in the files are expected to be in the same form as accepted by `git +sparse-checkout set --stdin` (in particular, they must be newline-delimited). ++ +By default, the rules passed to the `--rules-file` option are interpreted as +cone mode directories. To pass non-cone mode patterns with `--rules-file`, +combine the option with the `--no-cone` option. ++ +When called with the `-z` flag, the format of the paths input on stdin as well +as the output paths are \0 terminated and not quoted. Note that this does not +apply to the format of the rules passed with the `--rules-file` option. + + EXAMPLES -------- `git sparse-checkout set MY/DIR1 SUB/DIR2`:: |