538
539
git checkout B^0 &&
540
test_must_fail git merge C^0 &&
541
- git clean -fd &&
542
- git rm -rf a/ &&
543
- git rm a &&
541
+ if test "$GIT_TEST_MERGE_ALGORITHM" = ort
542
+ then
543
+ git rm -rf a/ &&
544
+ git rm a~HEAD
545
+ else
546
+ git clean -fd &&
547
+ git rm -rf a/ &&
548
+ git rm a
549
+ fi &&
550
git cat-file -p B:a >a2 &&
551
git add a2 &&
552
git commit -m D2 &&
565
566
git checkout C^0 &&
567
test_must_fail git merge B^0 &&
562
- git clean -fd &&
568
+ if test "$GIT_TEST_MERGE_ALGORITHM" = ort
569
+ then
570
+ git rm a~B^0
571
+ else
572
+ git clean -fd
573
+ fi &&
574
git rm -rf a/ &&
575
test_write_lines 1 2 3 4 5 6 7 8 >a &&
576
git add a &&
579
580
git checkout C^0 &&
581
test_must_fail git merge B^0 &&
571
- git clean -fd &&
572
- git rm -rf a/ &&
573
- git rm a &&
582
+ if test "$GIT_TEST_MERGE_ALGORITHM" = ort
583
+ then
584
+ git rm -rf a/ &&
585
+ git rm a~B^0
586
+ else
587
+ git clean -fd &&
588
+ git rm -rf a/ &&
589
+ git rm a
590
+ fi &&
591
test_write_lines 1 2 3 4 5 6 7 8 >a2 &&
592
git add a2 &&
593
git commit -m E4 &&
605
606
test_must_fail git merge -s recursive E1^0 &&
607
591
- git ls-files -s >out &&
592
- test_line_count = 2 out &&
593
- git ls-files -u >out &&
594
- test_line_count = 1 out &&
595
- git ls-files -o >out &&
596
- test_line_count = 1 out &&
597
-
598
- git rev-parse >expect \
599
- A:ignore-me B:a &&
600
- git rev-parse >actual \
601
- :0:ignore-me :2:a &&
602
- test_cmp expect actual
608
+ if test "$GIT_TEST_MERGE_ALGORITHM" = ort
609
+ then
610
+ git ls-files -s >out &&
611
+ test_line_count = 3 out &&
612
+ git ls-files -u >out &&
613
+ test_line_count = 2 out &&
614
+ git ls-files -o >out &&
615
+ test_line_count = 1 out &&
616
+
617
+ git rev-parse >expect \
618
+ A:ignore-me B:a D1:a &&
619
+ git rev-parse >actual \
620
+ :0:ignore-me :1:a :2:a &&
621
+ test_cmp expect actual
622
+ else
623
+ git ls-files -s >out &&
624
+ test_line_count = 2 out &&
625
+ git ls-files -u >out &&
626
+ test_line_count = 1 out &&
627
+ git ls-files -o >out &&
628
+ test_line_count = 1 out &&
629
+
630
+ git rev-parse >expect \
631
+ A:ignore-me B:a &&
632
+ git rev-parse >actual \
633
+ :0:ignore-me :2:a &&
634
+ test_cmp expect actual
635
+ fi
636
)
637
'
638
646
647
test_must_fail git merge -s recursive D1^0 &&
648
616
- git ls-files -s >out &&
617
- test_line_count = 2 out &&
618
- git ls-files -u >out &&
619
- test_line_count = 1 out &&
620
- git ls-files -o >out &&
621
- test_line_count = 1 out &&
622
-
623
- git rev-parse >expect \
624
- A:ignore-me B:a &&
625
- git rev-parse >actual \
626
- :0:ignore-me :3:a &&
627
- test_cmp expect actual
649
+ if test "$GIT_TEST_MERGE_ALGORITHM" = ort
650
+ then
651
+ git ls-files -s >out &&
652
+ test_line_count = 3 out &&
653
+ git ls-files -u >out &&
654
+ test_line_count = 2 out &&
655
+ git ls-files -o >out &&
656
+ test_line_count = 1 out &&
657
+
658
+ git rev-parse >expect \
659
+ A:ignore-me B:a D1:a &&
660
+ git rev-parse >actual \
661
+ :0:ignore-me :1:a :3:a &&
662
+ test_cmp expect actual
663
+ else
664
+ git ls-files -s >out &&
665
+ test_line_count = 2 out &&
666
+ git ls-files -u >out &&
667
+ test_line_count = 1 out &&
668
+ git ls-files -o >out &&
669
+ test_line_count = 1 out &&
670
+
671
+ git rev-parse >expect \
672
+ A:ignore-me B:a &&
673
+ git rev-parse >actual \
674
+ :0:ignore-me :3:a &&
675
+ test_cmp expect actual
676
+ fi
677
)
678
'
679
687
688
test_must_fail git merge -s recursive E2^0 &&
689
641
- git ls-files -s >out &&
642
- test_line_count = 4 out &&
643
- git ls-files -u >out &&
644
- test_line_count = 3 out &&
645
- git ls-files -o >out &&
646
- test_line_count = 2 out &&
647
-
648
- git rev-parse >expect \
649
- B:a E2:a/file C:a/file A:ignore-me &&
650
- git rev-parse >actual \
651
- :2:a :3:a/file :1:a/file :0:ignore-me &&
690
+ if test "$GIT_TEST_MERGE_ALGORITHM" = ort
691
+ then
692
+ git ls-files -s >out &&
693
+ test_line_count = 5 out &&
694
+ git ls-files -u >out &&
695
+ test_line_count = 4 out &&
696
+ git ls-files -o >out &&
697
+ test_line_count = 1 out &&
698
+
699
+ git rev-parse >expect \
700
+ B:a D1:a E2:a/file C:a/file A:ignore-me &&
701
+ git rev-parse >actual \
702
+ :1:a~HEAD :2:a~HEAD :3:a/file :1:a/file :0:ignore-me
703
+ else
704
+ git ls-files -s >out &&
705
+ test_line_count = 4 out &&
706
+ git ls-files -u >out &&
707
+ test_line_count = 3 out &&
708
+ git ls-files -o >out &&
709
+ test_line_count = 2 out &&
710
+
711
+ git rev-parse >expect \
712
+ B:a E2:a/file C:a/file A:ignore-me &&
713
+ git rev-parse >actual \
714
+ :2:a :3:a/file :1:a/file :0:ignore-me
715
+ fi &&
716
test_cmp expect actual &&
717
718
test_path_is_file a~HEAD
729
730
test_must_fail git merge -s recursive D1^0 &&
731
668
- git ls-files -s >out &&
669
- test_line_count = 4 out &&
670
- git ls-files -u >out &&
671
- test_line_count = 3 out &&
672
- git ls-files -o >out &&
673
- test_line_count = 2 out &&
674
-
675
- git rev-parse >expect \
676
- B:a E2:a/file C:a/file A:ignore-me &&
677
- git rev-parse >actual \
678
- :3:a :2:a/file :1:a/file :0:ignore-me &&
732
+ if test "$GIT_TEST_MERGE_ALGORITHM" = ort
733
+ then
734
+ git ls-files -s >out &&
735
+ test_line_count = 5 out &&
736
+ git ls-files -u >out &&
737
+ test_line_count = 4 out &&
738
+ git ls-files -o >out &&
739
+ test_line_count = 1 out &&
740
+
741
+ git rev-parse >expect \
742
+ B:a D1:a E2:a/file C:a/file A:ignore-me &&
743
+ git rev-parse >actual \
744
+ :1:a~D1^0 :3:a~D1^0 :2:a/file :1:a/file :0:ignore-me
745
+ else
746
+ git ls-files -s >out &&
747
+ test_line_count = 4 out &&
748
+ git ls-files -u >out &&
749
+ test_line_count = 3 out &&
750
+ git ls-files -o >out &&
751
+ test_line_count = 2 out &&
752
+
753
+ git rev-parse >expect \
754
+ B:a E2:a/file C:a/file A:ignore-me &&
755
+ git rev-parse >actual \
756
+ :3:a :2:a/file :1:a/file :0:ignore-me
757
+ fi &&
758
test_cmp expect actual &&
759
760
test_path_is_file a~D1^0