383
verify_notes y y
384
'
385
386
+test_expect_success 'merge z into y with "ours" per-ref configuration option => Non-conflicting 3-way merge' '
387
+ git -c notes.y.mergeStrategy="ours" notes merge z &&
388
+ verify_notes y ours
389
+'
390
+
391
+test_expect_success 'reset to pre-merge state (y)' '
392
+ git update-ref refs/notes/y refs/notes/y^1 &&
393
+ # Verify pre-merge state
394
+ verify_notes y y
395
+'
396
+
397
cat <<EOF | sort >expect_notes_theirs
398
9b4b2c61f0615412da3c10f98ff85b57c04ec765 $commit_sha15
399
5de7ea7ad4f47e7ff91989fb82234634730f75df $commit_sha14
545
verify_notes y y
546
'
547
548
+test_expect_success 'merge z into y with "union" strategy overriding per-ref configuration => Non-conflicting 3-way merge' '
549
+ git -c notes.y.mergeStrategy="theirs" notes merge --strategy=union z &&
550
+ verify_notes y union
551
+'
552
+
553
+test_expect_success 'reset to pre-merge state (y)' '
554
+ git update-ref refs/notes/y refs/notes/y^1 &&
555
+ # Verify pre-merge state
556
+ verify_notes y y
557
+'
558
+
559
+test_expect_success 'merge z into y with "union" per-ref overriding general configuration => Non-conflicting 3-way merge' '
560
+ git -c notes.y.mergeStrategy="union" -c notes.mergeStrategy="theirs" notes merge z &&
561
+ verify_notes y union
562
+'
563
+
564
+test_expect_success 'reset to pre-merge state (y)' '
565
+ git update-ref refs/notes/y refs/notes/y^1 &&
566
+ # Verify pre-merge state
567
+ verify_notes y y
568
+'
569
+
570
+test_expect_success 'merge z into y with "manual" per-ref only checks specific ref configuration => Conflicting 3-way merge' '
571
+ test_must_fail git -c notes.z.mergeStrategy="union" notes merge z &&
572
+ git notes merge --abort &&
573
+ verify_notes y y
574
+'
575
+
576
cat <<EOF | sort >expect_notes_union2
577
d682107b8bf7a7aea1e537a8d5cb6a12b60135f1 $commit_sha15
578
5de7ea7ad4f47e7ff91989fb82234634730f75df $commit_sha14