aboutsummaryrefslogtreecommitdiffstats
path: root/t/t3206-range-diff.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3206-range-diff.sh')
-rwxr-xr-xt/t3206-range-diff.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh
index 6eb344be03..323439d211 100755
--- a/t/t3206-range-diff.sh
+++ b/t/t3206-range-diff.sh
@@ -717,4 +717,19 @@ test_expect_success 'format-patch --range-diff with multiple notes' '
test_cmp expect actual
'
+test_expect_success '--left-only/--right-only' '
+ git switch --orphan left-right &&
+ test_commit first &&
+ test_commit unmatched &&
+ test_commit common &&
+ git switch -C left-right first &&
+ git cherry-pick common &&
+
+ git range-diff -s --left-only ...common >actual &&
+ head_oid=$(git rev-parse --short HEAD) &&
+ common_oid=$(git rev-parse --short common) &&
+ echo "1: $head_oid = 2: $common_oid common" >expect &&
+ test_cmp expect actual
+'
+
test_done