{"thread":{"id":"36896","subject":"[PATCH] Add no-git-links option to ls-files","startedAt":"2014-06-11T23:37:27Z","lastAt":"2014-06-11T23:37:27Z","messageCount":1,"participants":["Roland Schulz"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"243931","messageId":"5398E837.6060309@rschulz.eu","threadId":"36896","inReplyTo":null,"subject":"[PATCH] Add no-git-links option to ls-files","fromName":"Roland Schulz","fromEmail":"roland@rschulz.eu","sentAt":"2014-06-11T23:37:27Z","receivedAt":"2014-06-11T23:37:27Z","isPatch":true,"sender":{"key":"roland@rschulz.eu","avatar":null},"body":"Setting the option allows to list files in submodules.\n\nSigned-off-by: Roland Schulz <roland@utk.edu>\n---\n Documentation/git-ls-files.txt | 4 ++++\n builtin/ls-files.c             | 3 +++\n 2 files changed, 7 insertions(+)\n\ndiff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt\nindex e26f01f..71284de 100644\n--- a/Documentation/git-ls-files.txt\n+++ b/Documentation/git-ls-files.txt\n@@ -64,6 +64,10 @@ OPTIONS\n --no-empty-directory::\n        Do not list empty directories. Has no effect without --directory.\n \n+--no-git-links::\n+       If a directory looks like a repository, then show its whole\n+       contents not just its name.\n+\n -u::\n --unmerged::\n        Show unmerged files in the output (forces --stage)\ndiff --git a/builtin/ls-files.c b/builtin/ls-files.c\nindex 47c3880..47352e0 100644\n--- a/builtin/ls-files.c\n+++ b/builtin/ls-files.c\n@@ -479,6 +479,9 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix)\n                OPT_NEGBIT(0, \"empty-directory\", &dir.flags,\n                        N_(\"don't show empty directories\"),\n                        DIR_HIDE_EMPTY_DIRECTORIES),\n+               OPT_NEGBIT(0, \"git-links\", &dir.flags,\n+                       N_(\"show content for directories containing repositories\"),\n+                       DIR_NO_GITLINKS),\n                OPT_BOOL('u', \"unmerged\", &show_unmerged,\n                        N_(\"show unmerged files in the output\")),\n                OPT_BOOL(0, \"resolve-undo\", &show_resolve_undo,\n-- \n2.0.0.239.g0953113.dirty\n"}]}