aboutsummaryrefslogtreecommitdiff
path: root/Documentation/git-rev-parse.txt
diff options
context:
space:
mode:
authorØystein Walle <oystwa@gmail.com>2017-09-18 19:04:29 +0200
committerJunio C Hamano <gitster@pobox.com>2017-09-19 12:16:28 +0900
commit417abfde3534ad51a1a47e00ed799e40e3f7b4ae (patch)
treeeb25ed542b7e66906863197924077c567f5aad2c /Documentation/git-rev-parse.txt
parent94c9fd268d4287f6fbfef84793288479905a7e48 (diff)
downloadgit-417abfde3534ad51a1a47e00ed799e40e3f7b4ae.tar.gz
git-417abfde3534ad51a1a47e00ed799e40e3f7b4ae.tar.xz
rev-parse: rev-parse: add --is-shallow-repository
Running `git fetch --unshallow` on a repo that is not in fact shallow produces a fatal error message. Add a helper to rev-parse that scripters can use to determine whether a repo is shallow or not. Signed-off-by: Øystein Walle <oystwa@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-rev-parse.txt')
-rw-r--r--Documentation/git-rev-parse.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index b1293f24b..0917b8207 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -235,6 +235,9 @@ print a message to stderr and exit with nonzero status.
--is-bare-repository::
When the repository is bare print "true", otherwise "false".
+--is-shallow-repository::
+ When the repository is shallow print "true", otherwise "false".
+
--resolve-git-dir <path>::
Check if <path> is a valid repository or a gitfile that
points at a valid repository, and print the location of the