jhelwig/technosorcery.net — Issue #17: git rev-parse --glob
Author: jhelwig
Created: 2012-01-06 04:19:05+00:00
State: open
Labels: New post

Introduced in git/git@d08bae7e221727e26baab984b792854b842130d7 git/git@b09fe971dea73ff6f5296ce533a566114b23ca4e (1.7.0+)

```
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.

commit b09fe971dea73ff6f5296ce533a566114b23ca4e
Author: Ilari Liusvaara
Date: Wed Jan 20 01:48:26 2010

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'
```