From: Junio C Hamano Date: Thu, 21 Jan 2010 20:09:42 GMT Subject: Re: [PATCH 2/2] rev-parse --branches/--tags/--remotes=pattern Message-ID: <7vbpgnp6d5.fsf@alter.siamese.dyndns.org> In-Reply-To: <201001211827.05847.trast@student.ethz.ch> Thomas Rast writes: > Maybe the --branches, --tags and --remotes could be consolidated a > bit, as in the draft patch below. Looks sensible. > diff --git i/Documentation/git-rev-parse.txt w/Documentation/git-rev-parse.txt > index 2bbb566..6fce919 100644 > --- i/Documentation/git-rev-parse.txt > +++ w/Documentation/git-rev-parse.txt > @@ -104,29 +104,26 @@ OPTIONS > Show all refs found in `$GIT_DIR/refs`. > > --branches[=pattern]:: > - Show branch refs found in `$GIT_DIR/refs/heads`. If `pattern` > - is given, only branches matching given shell glob are shown. > - If pattern lacks '?', '*', or '[', '/*' at the end is impiled. > - > --tags[=pattern]:: > - Show tag refs found in `$GIT_DIR/refs/tags`. If `pattern` > - is given, only tags matching given shell glob are shown. > - If pattern lacks '?', '*', or '[', '/*' at the end is impiled. > - > --remotes[=pattern]:: > - Show tag refs found in `$GIT_DIR/refs/remotes`. If `pattern` > - is given, only remote tracking branches matching given shell glob > - are shown. If pattern lacks '?', '*', or '[', '/*' at the end is > - impiled. > + 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 anchored by appending `/\*`. > + > +--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 anchored by appending `/\*`. > > --show-toplevel:: > Show the absolute path of the top-level directory. > > ---glob=glob-pattern:: > - Show refs matching shell glob pattern `glob-pattern`. If pattern > - specified lacks leading 'refs/', it is automatically prepended. > - If pattern lacks '?', '*', or '[', '/*' at the end is impiled. > - > --show-prefix:: > When the command is invoked from a subdirectory, show the > path of the current directory relative to the top-level > > > -- > Thomas Rast > trast@{inf,student}.ethz.ch