X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-rev-parse.txt;h=d677c72d5ea6a8d38cf77f663e6b5da591028efa;hb=e7c2466593f5c8682a4fe7146f17b80acf134675;hp=818eb48d679a66fed046917f8211e3b490a80f31;hpb=4ca1b623865a9dc100f95a7867e35a9f73d7507a;p=git.git diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt index 818eb48d6..d677c72d5 100644 --- a/Documentation/git-rev-parse.txt +++ b/Documentation/git-rev-parse.txt @@ -33,7 +33,7 @@ OPTIONS --stop-at-non-option:: Only meaningful in `--parseopt` mode. Lets the option parser stop at the first non-option argument. This can be used to parse sub-commands - that take options themself. + that take options themselves. --sq-quote:: Use 'git rev-parse' in shell quoting mode (see SQ-QUOTE @@ -103,14 +103,24 @@ OPTIONS --all:: Show all refs found in `$GIT_DIR/refs`. ---branches:: - Show branch refs found in `$GIT_DIR/refs/heads`. - ---tags:: - Show tag refs found in `$GIT_DIR/refs/tags`. +--branches[=pattern]:: +--tags[=pattern]:: +--remotes[=pattern]:: + Show all branches, tags, or remote-tracking branches, + respectively (i.e., refs found in `$GIT_DIR/refs/heads`, + `$GIT_DIR/refs/tags`, or `$GIT_DIR/refs/remotes`, + respectively). ++ +If a `pattern` is given, only refs matching the given shell glob are +shown. If the pattern does not contain a globbing character (`?`, +`\*`, or `[`), it is turned into a prefix match by appending `/\*`. ---remotes:: - Show tag refs found in `$GIT_DIR/refs/remotes`. +--glob=pattern:: + Show all refs matching the shell glob pattern `pattern`. If + the pattern does not start with `refs/`, this is automatically + prepended. If the pattern does not contain a globbing + character (`?`, `\*`, or `[`), it is turned into a prefix + match by appending `/\*`. --show-toplevel:: Show the absolute path of the top-level directory. @@ -234,7 +244,7 @@ when you run 'git merge'. * The special construct '@\{-\}' means the th branch checked out before the current one. -* The suffix '@{upstream}' to a ref (short form 'ref@{u}') refers to +* The suffix '@\{upstream\}' to a ref (short form 'ref@\{u\}') refers to the branch the ref is set to build on top of. Missing ref defaults to the current branch.