diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-08-30 16:37:55 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-08-30 16:37:55 -0700 |
commit | e7b432c521b0177e86eaecd2bd16906b9fc53e10 (patch) | |
tree | 179470e0cce46ceca0264af3652c7641ff65c1b1 /t/t2005-checkout-index-symlinks.sh | |
parent | Git 1.8.4 (diff) | |
download | tgif-e7b432c521b0177e86eaecd2bd16906b9fc53e10.tar.xz |
revision: introduce --exclude=<glob> to tame wildcards
People often find "git log --branches" etc. that includes _all_
branches is cumbersome to use when they want to grab most but except
some. The same applies to --tags, --all and --glob.
Teach the revision machinery to remember patterns, and then upon the
next such a globbing option, exclude those that match the pattern.
With this, I can view only my integration branches (e.g. maint,
master, etc.) without topic branches, which are named after two
letters from primary authors' names, slash and topic name.
git rev-list --no-walk --exclude=??/* --branches |
git name-rev --refs refs/heads/* --stdin
This one shows things reachable from local and remote branches that
have not been merged to the integration branches.
git log --remotes --branches --not --exclude=??/* --branches
It may be a bit rough around the edges, in that the pattern to give
the exclude option depends on what globbing option follows. In
these examples, the pattern "??/*" is used, not "refs/heads/??/*",
because the globbing option that follows the -"-exclude=<pattern>"
is "--branches". As each use of globbing option resets previously
set "--exclude", this may not be such a bad thing, though.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2005-checkout-index-symlinks.sh')
0 files changed, 0 insertions, 0 deletions