]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Documentation/git-rev-parse.txt
Update 1.7.0.1 release notes
[thirdparty/git.git] / Documentation / git-rev-parse.txt
index d375f1af1025698f73900d7eacdf8dc314a87278..d677c72d5ea6a8d38cf77f663e6b5da591028efa 100644 (file)
@@ -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,6 +244,10 @@ when you run 'git merge'.
 * The special construct '@\{-<n>\}' means the <n>th branch checked out
   before the current one.
 
+* 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.
+
 * A suffix '{caret}' to a revision parameter means the first parent of
   that commit object.  '{caret}<n>' means the <n>th parent (i.e.
   'rev{caret}'