diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2021-12-22 14:20:53 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-22 11:42:40 -0800 |
commit | 78087097b8b77aca355525ebaf98205eb7acad60 (patch) | |
tree | 5acd4a9234f38e3859b1dfdf168a9eeb8545d102 /Documentation/git-ls-files.txt | |
parent | fetch/pull: use the sparse index (diff) | |
download | tgif-78087097b8b77aca355525ebaf98205eb7acad60.tar.xz |
ls-files: add --sparse option
Existing callers to 'git ls-files' are expecting file names, not
directories. It is best to expand a sparse index to show all of the
contained files in this case.
However, expert users may want to inspect the contents of the index
itself including which directories are sparse. Add a --sparse option to
allow users to request this information.
During testing, I noticed that options such as --modified did not affect
the output when the files in question were outside the sparse-checkout
definition. Tests are added to document this preexisting behavior and
how it remains unchanged with the sparse index and the --sparse option.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-ls-files.txt')
-rw-r--r-- | Documentation/git-ls-files.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt index 2e3d695fa2..48cc7c0b6f 100644 --- a/Documentation/git-ls-files.txt +++ b/Documentation/git-ls-files.txt @@ -187,6 +187,11 @@ Both the <eolinfo> in the index ("i/<eolinfo>") and in the working tree ("w/<eolinfo>") are shown for regular files, followed by the ("attr/<eolattr>"). +--sparse:: + If the index is sparse, show the sparse directories without expanding + to the contained files. Sparse directories will be shown with a + trailing slash, such as "x/" for a sparse directory "x". + \--:: Do not interpret any more arguments as options. |