From: Nguyễn Thái Ngọc Duy Date: Sun, 30 Mar 2014 13:56:02 GMT Subject: [PATCH v3 11/18] list-files: add -R/--recursive short for --max-depth=-1 Message-ID: <1396187769-30863-12-git-send-email-pclouds@gmail.com> In-Reply-To: <1396187769-30863-1-git-send-email-pclouds@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-list-files.txt | 4 ++++ builtin/ls-files.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/Documentation/git-list-files.txt b/Documentation/git-list-files.txt index 3039e1e..5dccbbc 100644 --- a/Documentation/git-list-files.txt +++ b/Documentation/git-list-files.txt @@ -45,6 +45,10 @@ OPTIONS --unmerged:: Show unmerged files +-R:: +--recursive:: + Equivalent of `--max-depth=-1` (infinite recursion). + --color[=]:: --no-color:: Color file names. The value must be `always`, `never`, or diff --git a/builtin/ls-files.c b/builtin/ls-files.c index addbcce..656b632 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -594,6 +594,8 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix) N_("show cached files that have modification on working directory")), OPT_BOOL('o', "others", &show_others, N_("show untracked files")), + OPT_SET_INT('R', "recursive", &max_depth, + N_("shortcut for --max-depth=-1"), -1), OPT_BIT('i', "ignored", &dir.flags, N_("show ignored files"), DIR_SHOW_IGNORED), -- 1.9.1.345.ga1a145c