From d08bae7e221727e26baab984b792854b842130d7 Mon Sep 17 00:00:00 2001 From: Ilari Liusvaara Date: Wed, 20 Jan 2010 11:48:25 +0200 Subject: rev-parse --glob Add --glob= option to rev-parse and everything that accepts its options. This option matches all refs that match given shell glob pattern (complete with some DWIM logic). Example: 'git log --branches --not --glob=remotes/origin' To show what you have that origin doesn't. Signed-off-by: Ilari Liusvaara Signed-off-by: Junio C Hamano --- Documentation/git-log.txt | 11 +++++++++++ Documentation/git-rev-list.txt | 1 + Documentation/git-rev-parse.txt | 5 +++++ Documentation/rev-list-options.txt | 7 +++++++ 4 files changed, 24 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index 3d79de11e..0b874e3d1 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -107,6 +107,17 @@ 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/*:: + + 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:: + + Shows all commits that are in local master but not in any remote + repository master branches. + Discussion ---------- diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt index 3341d1b62..33122a3f3 100644 --- a/Documentation/git-rev-list.txt +++ b/Documentation/git-rev-list.txt @@ -24,6 +24,7 @@ SYNOPSIS [ \--branches ] [ \--tags ] [ \--remotes ] + [ \--glob=glob-pattern ] [ \--stdin ] [ \--quiet ] [ \--topo-order ] diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt index 82045a252..6eb8c14f6 100644 --- a/Documentation/git-rev-parse.txt +++ b/Documentation/git-rev-parse.txt @@ -112,6 +112,11 @@ OPTIONS --remotes:: Show tag refs found in `$GIT_DIR/refs/remotes`. +--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 diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt index 1f57aed33..6d03c17a6 100644 --- a/Documentation/rev-list-options.txt +++ b/Documentation/rev-list-options.txt @@ -243,6 +243,13 @@ endif::git-rev-list[] Pretend as if all the refs in `$GIT_DIR/refs/remotes` are listed on the command line as ''. +--glob=glob-pattern:: + Pretend as if all the refs matching shell glob `glob-pattern` + are listed on the command line as ''. Leading 'refs/', + is automatically prepended if missing. If pattern lacks '?', '*', + or '[', '/*' at the end is impiled. + + ifndef::git-rev-list[] --bisect:: -- cgit v1.2.1