git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Add no-git-links option to ls-files

From
RSRoland Schulz <roland@rschulz.eu>
Date
Jun 11, 2014, 23:37 UTC
Message-ID
<5398E837.6060309@rschulz.eu>
Setting the option allows to list files in submodules.
Signed-off-by: Roland Schulz <roland@utk.edu>
---
 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
 --no-empty-directory::
        Do not list empty directories. Has no effect without --directory.
 
+--no-git-links::
+       If a directory looks like a repository, then show its whole
+       contents not just its name.
+
 -u::
 --unmerged::
        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 *cmd_prefix)
                OPT_NEGBIT(0, "empty-directory", &dir.flags,
                        N_("don't show empty directories"),
                        DIR_HIDE_EMPTY_DIRECTORIES),
+               OPT_NEGBIT(0, "git-links", &dir.flags,
+                       N_("show content for directories containing repositories"),
+                       DIR_NO_GITLINKS),
                OPT_BOOL('u', "unmerged", &show_unmerged,
                        N_("show unmerged files in the output")),
                OPT_BOOL(0, "resolve-undo", &show_resolve_undo,
-- 
2.0.0.239.g0953113.dirty
Message 1 of 1 in “Add no-git-links option to ls-files”
  1. Add no-git-links option to ls-filesRoland Schulz, Jun 11, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.