summaryrefslogtreecommitdiff
path: root/Documentation/git-ls-files.txt
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2016-10-07 11:18:51 -0700
committerJunio C Hamano <gitster@pobox.com>2016-10-10 12:14:58 -0700
commit75a6315f7416a2fd559d0b0c7352b4f1cd10e186 (patch)
tree55917b990573d03edc34972d2cae484da819d5fb /Documentation/git-ls-files.txt
parent07c01b9fd927b35375bd3a7d4d9dbf7bb8509f09 (diff)
downloadgit-75a6315f7416a2fd559d0b0c7352b4f1cd10e186.tar.gz
ls-files: add pathspec matching for submodulesbw/ls-files-recurse-submodules
Pathspecs can be a bit tricky when trying to apply them to submodules. The main challenge is that the pathspecs will be with respect to the superproject and not with respect to paths in the submodule. The approach this patch takes is to pass in the identical pathspec from the superproject to the submodule in addition to the submodule-prefix, which is the path from the root of the superproject to the submodule, and then we can compare an entry in the submodule prepended with the submodule-prefix to the pathspec in order to determine if there is a match. This patch also permits the pathspec logic to perform a prefix match against submodules since a pathspec could refer to a file inside of a submodule. Due to limitations in the wildmatch logic, a prefix match is only done literally. If any wildcard character is encountered we'll simply punt and produce a false positive match. More accurate matching will be done once inside the submodule. This is due to the superproject not knowing what files could exist in the submodule. Signed-off-by: Brandon Williams <bmwill@google.com> Reviewed-by: Stefan Beller <sbeller@google.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.txt3
1 files changed, 1 insertions, 2 deletions
diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt
index ea01d45e5c..446209e206 100644
--- a/Documentation/git-ls-files.txt
+++ b/Documentation/git-ls-files.txt
@@ -140,8 +140,7 @@ a space) at the start of each line:
--recurse-submodules::
Recursively calls ls-files on each submodule in the repository.
- Currently there is only support for the --cached mode without a
- pathspec.
+ Currently there is only support for the --cached mode.
--abbrev[=<n>]::
Instead of showing the full 40-byte hexadecimal object