Code

Documentation: move away misplaced 'push --upstream' description
[git.git] / Documentation / git-rev-parse.txt
index 82ae16e0eb7f67ba7af2cef3be58ed26ce872589..e7845d4055f81caf2fa92268a17837514f08c4d3 100644 (file)
@@ -103,14 +103,27 @@ OPTIONS
 --all::
        Show all refs found in `$GIT_DIR/refs`.
 
---branches::
-       Show branch refs found in `$GIT_DIR/refs/heads`.
+--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 `/\*`.
 
---tags::
-       Show tag refs found in `$GIT_DIR/refs/tags`.
+--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 `/\*`.
 
---remotes::
-       Show tag refs found in `$GIT_DIR/refs/remotes`.
+--show-toplevel::
+       Show the absolute path of the top-level directory.
 
 --show-prefix::
        When the command is invoked from a subdirectory, show the
@@ -231,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}'