]> git.ipfire.org Git - thirdparty/git.git/commit
ls-files: support --recurse-submodules --stage
authorJonathan Tan <jonathantanmy@google.com>
Thu, 24 Feb 2022 00:23:03 +0000 (16:23 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 24 Feb 2022 00:41:55 +0000 (16:41 -0800)
commit290eada0ac9d374501fa24268c2e1ec8b8924358
tree368be9448da0ddbe3e747493e0c1617c8b93f299
parente6ebfd0e8cbbd10878070c8a356b5ad1b3ca464e
ls-files: support --recurse-submodules --stage

e77aa336f1 ("ls-files: optionally recurse into submodules", 2016-10-10)
taught ls-files the --recurse-submodules argument, but only in a limited
set of circumstances. In particular, --stage was unsupported, perhaps
because there was no repo_find_unique_abbrev(), which was only
introduced in 8bb95572b0 ("sha1-name.c: add
repo_find_unique_abbrev_r()", 2019-04-16). This function is needed for
using --recurse-submodules with --stage.

Now that we have repo_find_unique_abbrev(), teach support for this
combination of arguments.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-ls-files.txt
builtin/ls-files.c
t/t3007-ls-files-recurse-submodules.sh