git ls-files --stage
helpful, but shows only commits from my repository and not inside the submodules.
Before Git 2.36 (Q2 2022), many output modes of "ls-files" do not work with its "--recurse-submodules" option, but the "--stage" mode has now been taught to work with it.
See commit 290eada (23 Feb 2022) by Jonathan Tan (jhowtan
).
(Merged by Junio C Hamano -- gitster
-- in commit 7a4e06c, 06 Mar 2022)
ls-files
: support --recurse-submodules --stage
Signed-off-by: Jonathan Tan
e77aa33 ("ls-files
: optionally recurse into submodules", 2016-10-10, Git v2.11.0-rc0 -- merge listed in batch #11) 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 8bb9557 ("sha1
-name.c``: add repo_find_unique_abbrev_r()
", 2019-04-16, Git v2.22.0-rc0 -- merge listed in batch #8).
This function is needed for using --recurse-submodules
with --stage.
git ls-files
now includes in its man page:
--recurse-submodules
:
Recursively calls ls-files
on each active submodule in the repository.
Currently there is only support for the --cached
and --stage
modes.