"git for-each-ref" and friends that list refs used to allow only
one --merged or --no-merged to filter them; they learned to take
combination of both kind of filtering.
* al/ref-filter-merged-and-no-merged:
Doc: prefer more specific file name
ref-filter: make internal reachable-filter API more precise
ref-filter: allow merged and no-merged filters
Doc: cover multiple contains/no-contains filters
t3201: test multiple branch filter combinations
@ -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`.
<branchname>::
The name of the branch to create or delete.
@ -370,6 +368,8 @@ serve four related but different purposes:
@@ -370,6 +368,8 @@ serve four related but different purposes:
- `--no-merged` is used to find branches which are candidates for merging
into HEAD, since those branches are not fully contained by HEAD.
Only list refs whose tips are not reachable from the
specified commit (HEAD if not specified),
incompatible with `--merged`.
specified commit (HEAD if not specified).
--contains[=<object>]::
Only list refs which contain the specified commit (HEAD if not
@ -408,6 +406,11 @@ Note also that multiple copies of an object may be present in the object
@@ -408,6 +406,11 @@ Note also that multiple copies of an object may be present in the object
database; in this case, it is undefined which copy's size or delta base
@ -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`.
@ -171,6 +171,69 @@ test_expect_success 'Assert that --contains only works on commits, not trees & b
@@ -171,6 +171,69 @@ test_expect_success 'Assert that --contains only works on commits, not trees & b
@ -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' '