[PATCH 2/2] revparse: introduce --is-inside-working-tree

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

 



This behaves the same as 'is-inside-worktree' and supersedes it.
See prior patch for discussion of "working tree" vs. "worktree"

Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx>
---
 Documentation/git-rev-parse.txt | 4 ++--
 builtin/rev-parse.c             | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index c40c470448..55ee3bde55 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -228,8 +228,8 @@ print a message to stderr and exit with nonzero status.
 	When the current working directory is below the repository
 	directory print "true", otherwise "false".
 
---is-inside-work-tree::
-	When the current working directory is inside the work tree of the
+--is-inside-working-tree::
+	When the current working directory is inside the working tree of the
 	repository print "true", otherwise "false".
 
 --is-bare-repository::
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index 2549643267..04da518058 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -851,7 +851,8 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
 						: "false");
 				continue;
 			}
-			if (!strcmp(arg, "--is-inside-work-tree")) {
+			if (!strcmp(arg, "--is-inside-work-tree") ||
+			    !strcmp(arg, "--is-inside-working-tree")) {
 				printf("%s\n", is_inside_work_tree() ? "true"
 						: "false");
 				continue;
-- 
2.12.0.306.g4a9b9b32d4.dirty




[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]