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>
@ -252,13 +252,11 @@ start-point is either a local or remote-tracking branch.
@@ -252,13 +252,11 @@ start-point is either a local or remote-tracking branch.
--merged [<commit>]::
Only list branches whose tips are reachable from the
specified commit (HEAD if not specified). Implies `--list`,
incompatible with `--no-merged`.
specified commit (HEAD if not specified). Implies `--list`.
--no-merged [<commit>]::
Only list branches whose tips are not reachable from the
specified commit (HEAD if not specified). Implies `--list`,
incompatible with `--merged`.
specified commit (HEAD if not specified). Implies `--list`.
@ -149,11 +149,11 @@ This option is only applicable when listing tags without annotation lines.
@@ -149,11 +149,11 @@ This option is only applicable when listing tags without annotation lines.
--merged [<commit>]::
Only list tags whose commits are reachable from the specified
commit (`HEAD` if not specified), incompatible with `--no-merged`.
commit (`HEAD` if not specified).
--no-merged [<commit>]::
Only list tags whose commits are not reachable from the specified
commit (`HEAD` if not specified), incompatible with `--merged`.
@ -2015,8 +2015,8 @@ test_expect_success '--merged can be used in non-list mode' '
@@ -2015,8 +2015,8 @@ test_expect_success '--merged can be used in non-list mode' '
test_cmp expect actual
'
test_expect_success '--merged is incompatible with --no-merged' '
test_must_fail git tag --merged HEAD --no-merged HEAD
test_expect_success '--merged is compatible with --no-merged' '