diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-06-28 15:53:14 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-06-28 15:53:14 -0700 |
| commit | 2988b82b87750659aae4e9b2c2452da1605ca032 (patch) | |
| tree | 8830fbca9664eaa26df86738ecbaf990428c05ca | |
| parent | 0d56a5946afea7a9684cb5ba821f7c57a1b0d443 (diff) | |
| parent | d424488901fffded2e3098eb4294b47e0391bc67 (diff) | |
| download | git-2988b82b87750659aae4e9b2c2452da1605ca032.tar.gz | |
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
| -rw-r--r-- | Documentation/git-rev-parse.txt | 15 |
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 ~~~~~~~~~~~~~~~~~~~~~~ |
