summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t3200-branch.sh4
-rwxr-xr-xt/t3201-branch-contains.sh27
-rwxr-xr-xt/t6302-for-each-ref-filter.sh4
-rwxr-xr-xt/t7004-tag.sh4
4 files changed, 31 insertions, 8 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index 4c07341..bf3c3a3 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -1298,10 +1298,6 @@ test_expect_success '--merged catches invalid object names' '
test_must_fail git branch --merged 0000000000000000000000000000000000000000
'
-test_expect_success '--merged is incompatible with --no-merged' '
- test_must_fail git branch --merged HEAD --no-merged HEAD
-'
-
test_expect_success '--list during rebase' '
test_when_finished "reset_rebase" &&
git checkout master &&
diff --git a/t/t3201-branch-contains.sh b/t/t3201-branch-contains.sh
index 3cb9dc6..efea5c4 100755
--- a/t/t3201-branch-contains.sh
+++ b/t/t3201-branch-contains.sh
@@ -187,6 +187,16 @@ test_expect_success 'multiple branch --contains' '
test_cmp expect actual
'
+test_expect_success 'multiple branch --merged' '
+ git branch --merged next --merged master >actual &&
+ cat >expect <<-\EOF &&
+ master
+ * next
+ side
+ EOF
+ test_cmp expect actual
+'
+
test_expect_success 'multiple branch --no-contains' '
git branch --no-contains side --no-contains side2 >actual &&
cat >expect <<-\EOF &&
@@ -195,6 +205,14 @@ test_expect_success 'multiple branch --no-contains' '
test_cmp expect actual
'
+test_expect_success 'multiple branch --no-merged' '
+ git branch --no-merged next --no-merged master >actual &&
+ cat >expect <<-\EOF &&
+ side2
+ EOF
+ test_cmp expect actual
+'
+
test_expect_success 'branch --contains combined with --no-contains' '
git checkout -b seen master &&
git merge side &&
@@ -207,6 +225,15 @@ test_expect_success 'branch --contains combined with --no-contains' '
test_cmp expect actual
'
+test_expect_success 'branch --merged combined with --no-merged' '
+ git branch --merged seen --no-merged next >actual &&
+ cat >expect <<-\EOF &&
+ * seen
+ side2
+ EOF
+ test_cmp expect actual
+'
+
# We want to set up a case where the walk for the tracking info
# of one branch crosses the tip of another branch (and make sure
# that the latter walk does not mess up our flag to see if it was
diff --git a/t/t6302-for-each-ref-filter.sh b/t/t6302-for-each-ref-filter.sh
index 35408d5..781e470 100755
--- a/t/t6302-for-each-ref-filter.sh
+++ b/t/t6302-for-each-ref-filter.sh
@@ -437,8 +437,8 @@ test_expect_success 'check %(if:notequals=<string>)' '
test_cmp expect actual
'
-test_expect_success '--merged is incompatible with --no-merged' '
- test_must_fail git for-each-ref --merged HEAD --no-merged HEAD
+test_expect_success '--merged is compatible with --no-merged' '
+ git for-each-ref --merged HEAD --no-merged HEAD
'
test_expect_success 'validate worktree atom' '
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 74b637d..05f411c 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -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' '
+ git tag --merged HEAD --no-merged HEAD
'
test_expect_success '--merged shows merged tags' '