From b09fe971dea73ff6f5296ce533a566114b23ca4e Mon Sep 17 00:00:00 2001 From: Ilari Liusvaara Date: Wed, 20 Jan 2010 11:48:26 +0200 Subject: rev-parse --branches/--tags/--remotes=pattern Since local branch, tags and remote tracking branch namespaces are most often used, add shortcut notations for globbing those in manner similar to --glob option. With this, one can express the "what I have but origin doesn't?" as: 'git log --branches --not --remotes=origin' Original-idea-by: Johannes Sixt Signed-off-by: Ilari Liusvaara Signed-off-by: Junio C Hamano --- Documentation/git-log.txt | 4 ++-- Documentation/git-rev-list.txt | 6 +++--- Documentation/git-rev-parse.txt | 19 +++++++++++++------ Documentation/rev-list-options.txt | 18 ++++++++++++------ 4 files changed, 30 insertions(+), 17 deletions(-) (limited to 'Documentation') diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index 0b874e3d1a..0acd526303 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -107,13 +107,13 @@ git log --follow builtin-rev-list.c:: those commits that occurred before the file was given its present name. -git log --branches --not --glob=remotes/origin/*:: +git log --branches --not --remotes=origin:: Shows all commits that are in any of local branches but not in any of remote tracking branches for 'origin' (what you have that origin doesn't). -git log master --not --glob=remotes/*/master:: +git log master --not --remotes=*/master:: Shows all commits that are in local master but not in any remote repository master branches. diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt index 33122a3f33..f85711676b 100644 --- a/Documentation/git-rev-list.txt +++ b/Documentation/git-rev-list.txt @@ -21,9 +21,9 @@ SYNOPSIS [ \--full-history ] [ \--not ] [ \--all ] - [ \--branches ] - [ \--tags ] - [ \--remotes ] + [ \--branches[=pattern] ] + [ \--tags=[pattern] ] + [ \--remotes=[pattern] ] [ \--glob=glob-pattern ] [ \--stdin ] [ \--quiet ] diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt index 6eb8c14f62..afe8699999 100644 --- a/Documentation/git-rev-parse.txt +++ b/Documentation/git-rev-parse.txt @@ -103,14 +103,21 @@ OPTIONS --all:: Show all refs found in `$GIT_DIR/refs`. ---branches:: - Show branch refs found in `$GIT_DIR/refs/heads`. +--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:: - Show tag refs found in `$GIT_DIR/refs/tags`. +--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:: - Show tag refs found in `$GIT_DIR/refs/remotes`. +--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. --glob=glob-pattern:: Show refs matching shell glob pattern `glob-pattern`. If pattern diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt index 6d03c17a68..3ef71179d9 100644 --- a/Documentation/rev-list-options.txt +++ b/Documentation/rev-list-options.txt @@ -228,20 +228,26 @@ endif::git-rev-list[] Pretend as if all the refs in `$GIT_DIR/refs/` are listed on the command line as ''. ---branches:: +--branches[=pattern]:: Pretend as if all the refs in `$GIT_DIR/refs/heads` are listed - on the command line as ''. + on the command line as ''. If `pattern` is given, limit + branches to ones matching given shell glob. If pattern lacks '?', + '*', or '[', '/*' at the end is impiled. ---tags:: +--tags[=pattern]:: Pretend as if all the refs in `$GIT_DIR/refs/tags` are listed - on the command line as ''. + on the command line as ''. If `pattern` is given, limit + tags to ones matching given shell glob. If pattern lacks '?', '*', + or '[', '/*' at the end is impiled. ---remotes:: +--remotes[=pattern]:: Pretend as if all the refs in `$GIT_DIR/refs/remotes` are listed - on the command line as ''. + on the command line as ''. If `pattern`is given, limit + remote tracking branches to ones matching given shell glob. + If pattern lacks '?', '*', or '[', '/*' at the end is impiled. --glob=glob-pattern:: Pretend as if all the refs matching shell glob `glob-pattern` -- cgit v1.2.3