]> git.ipfire.org Git - thirdparty/git.git/commit - ref-filter.c
ref-filter: allow merged and no-merged filters
authorAaron Lipman <alipman88@gmail.com>
Wed, 16 Sep 2020 02:08:40 +0000 (22:08 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Sep 2020 19:38:10 +0000 (12:38 -0700)
commit21bf933928c02372633b88aa6c4d9d71271d42b3
treee2ad37586b8eef4cb8bee34ff495ed4d7aed0c46
parent415af72b174802a45300039ef2bc1127d48dc0c0
ref-filter: allow merged and no-merged filters

Enable ref-filter to process multiple merged and no-merged filters, and
extend functionality to git branch, git tag and git for-each-ref. This
provides an easy way to check for branches that are "graduation
candidates:"

$ git branch --no-merged master --merged next

If passed more than one merged (or more than one no-merged) filter, refs
must be reachable from any one of the merged commits, and reachable from
none of the no-merged commits.

Signed-off-by: Aaron Lipman <alipman88@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 files changed:
Documentation/filters.txt
Documentation/git-branch.txt
Documentation/git-for-each-ref.txt
Documentation/git-tag.txt
builtin/branch.c
builtin/for-each-ref.c
builtin/tag.c
ref-filter.c
ref-filter.h
t/t3200-branch.sh
t/t3201-branch-contains.sh
t/t6302-for-each-ref-filter.sh
t/t7004-tag.sh