aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-05-28 11:17:10 -0700
committerJunio C Hamano <gitster@pobox.com>2024-05-28 11:17:10 -0700
commit3acecc04c7f2b90c481062b227b1b8f44af9132c (patch)
tree817335b1ce045bfacaad1ee33192e2f3010dfc50
parentdfe42162d9bf748dcb2037d349077288ab736ad2 (diff)
parentd424488901fffded2e3098eb4294b47e0391bc67 (diff)
downloadgit-3acecc04c7f2b90c481062b227b1b8f44af9132c.tar.gz
Merge branch 'jc/rev-parse-fatal-doc'
Doc update. * jc/rev-parse-fatal-doc: rev-parse: document how --is-* options work outside a repository
-rw-r--r--Documentation/git-rev-parse.txt15
1 files changed, 13 insertions, 2 deletions
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index f9d5a35fa0..dc12d38534 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -18,8 +18,15 @@ Many Git porcelainish commands take a mixture of flags
(i.e. parameters that begin with a dash '-') and parameters
meant for the underlying 'git rev-list' command they use internally
and flags and parameters for the other commands they use
-downstream of 'git rev-list'. This command is used to
-distinguish between them.
+downstream of 'git rev-list'. The primary purpose of this command
+is to allow calling programs to distinguish between them. There are
+a few other operation modes that have nothing to do with the above
+"help parse command line options".
+
+Unless otherwise specified, most of the options and operation modes
+require you to run this command inside a git repository or a working
+tree that is under the control of a git repository, and will give you
+a fatal error otherwise.
OPTIONS
@@ -32,11 +39,15 @@ Each of these options must appear first on the command line.
--parseopt::
Use 'git rev-parse' in option parsing mode (see PARSEOPT section below).
+ The command in this mode can be used outside a repository or
+ a working tree controlled by a repository.
--sq-quote::
Use 'git rev-parse' in shell quoting mode (see SQ-QUOTE
section below). In contrast to the `--sq` option below, this
mode only does quoting. Nothing else is done to command input.
+ The command in this mode can be used outside a repository or
+ a working tree controlled by a repository.
Options for --parseopt
~~~~~~~~~~~~~~~~~~~~~~