Setting the option allows to list files in submodules.

Signed-off-by: Roland Schulz <>
 Documentation/git-ls-files.txt | 4 ++++
 builtin/ls-files.c             | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt
index e26f01f..71284de 100644
--- a/Documentation/git-ls-files.txt
+++ b/Documentation/git-ls-files.txt
@@ -64,6 +64,10 @@ OPTIONS
        Do not list empty directories. Has no effect without --directory.
+       If a directory looks like a repository, then show its whole
+       contents not just its name.
        Show unmerged files in the output (forces --stage)
diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index 47c3880..47352e0 100644
--- a/builtin/ls-files.c
+++ b/builtin/ls-files.c
@@ -479,6 +479,9 @@ int cmd_ls_files(int argc, const char **argv, const char 
                OPT_NEGBIT(0, "empty-directory", &dir.flags,
                        N_("don't show empty directories"),
+               OPT_NEGBIT(0, "git-links", &dir.flags,
+                       N_("show content for directories containing 
+                       DIR_NO_GITLINKS),
                OPT_BOOL('u', "unmerged", &show_unmerged,
                        N_("show unmerged files in the output")),
                OPT_BOOL(0, "resolve-undo", &show_resolve_undo,

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to