[PATCH v2 12/17] ls: add -R/--recursive short for --max-depth=-1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
---
 Documentation/git-ls.txt | 4 ++++
 builtin/ls-files.c       | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/Documentation/git-ls.txt b/Documentation/git-ls.txt
index 67ca522..10df6b0 100644
--- a/Documentation/git-ls.txt
+++ b/Documentation/git-ls.txt
@@ -47,6 +47,10 @@ OPTIONS
 --unmerged::
 	Show unmerged files in the output (forces --stage)
 
+-R::
+--recursive::
+	Equivalent of --max-depth=-1 (infinite recursion).
+
 --color[=<when>]::
 	Color file names. The value must be always (default), never,
 	or auto.
diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index 1638983..772a6ce 100644
--- a/builtin/ls-files.c
+++ b/builtin/ls-files.c
@@ -725,6 +725,8 @@ int cmd_ls(int argc, const char **argv, const char *cmd_prefix)
 			DIR_SHOW_IGNORED),
 		OPT_BOOL('u', "unmerged", &show_unmerged,
 			N_("show unmerged files in the output")),
+		OPT_SET_INT('R', "recursive", &max_depth,
+			    N_("shortcut for --max-depth=-1"), -1),
 		OPT__COLOR(&use_color, N_("show color")),
 		OPT_COLUMN(0, "column", &colopts, N_("show files in columns")),
 		{ OPTION_INTEGER, 0, "max-depth", &max_depth, N_("depth"),
-- 
1.9.1.345.ga1a145c

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]