Skip to content

Commit 2988b82

Browse files
committed
Merge branch 'jc/rev-parse-fatal-doc' into maint-2.45
Doc update. * jc/rev-parse-fatal-doc: rev-parse: document how --is-* options work outside a repository
2 parents 0d56a59 + d424488 commit 2988b82

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

Documentation/git-rev-parse.txt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,15 @@ Many Git porcelainish commands take a mixture of flags
1818
(i.e. parameters that begin with a dash '-') and parameters
1919
meant for the underlying 'git rev-list' command they use internally
2020
and flags and parameters for the other commands they use
21-
downstream of 'git rev-list'. This command is used to
22-
distinguish between them.
21+
downstream of 'git rev-list'. The primary purpose of this command
22+
is to allow calling programs to distinguish between them. There are
23+
a few other operation modes that have nothing to do with the above
24+
"help parse command line options".
25+
26+
Unless otherwise specified, most of the options and operation modes
27+
require you to run this command inside a git repository or a working
28+
tree that is under the control of a git repository, and will give you
29+
a fatal error otherwise.
2330

2431

2532
OPTIONS
@@ -32,11 +39,15 @@ Each of these options must appear first on the command line.
3239

3340
--parseopt::
3441
Use 'git rev-parse' in option parsing mode (see PARSEOPT section below).
42+
The command in this mode can be used outside a repository or
43+
a working tree controlled by a repository.
3544

3645
--sq-quote::
3746
Use 'git rev-parse' in shell quoting mode (see SQ-QUOTE
3847
section below). In contrast to the `--sq` option below, this
3948
mode only does quoting. Nothing else is done to command input.
49+
The command in this mode can be used outside a repository or
50+
a working tree controlled by a repository.
4051

4152
Options for --parseopt
4253
~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)