git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roland Schulz <roland@rschulz.eu>
To: git@vger.kernel.org
Subject: [PATCH] Add no-git-links option to ls-files
Date: Wed, 11 Jun 2014 19:37:27 -0400	[thread overview]
Message-ID: <5398E837.6060309@rschulz.eu> (raw)

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

                 reply	other threads:[~2014-06-11 23:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5398E837.6060309@rschulz.eu \
    --to=roland@rschulz.eu \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).