@@ -71,16 +71,16 @@ test_expect_success '1a-L: Modify(A)/Modify(B), change on B subset of A' '
71
71
72
72
git checkout A^0 &&
73
73
74
- test-tool chmtime =31337 b &&
75
- test-tool chmtime -v +0 b >expected -mtime &&
74
+ test-tool chmtime =-1 b &&
75
+ test-tool chmtime --get b >old -mtime &&
76
76
77
77
GIT_MERGE_VERBOSITY=3 git merge -s recursive B^0 >out 2>err &&
78
78
79
- test_i18ngrep "Skipped b" out &&
80
79
test_must_be_empty err &&
81
80
82
- test-tool chmtime -v +0 b >actual-mtime &&
83
- test_cmp expected-mtime actual-mtime &&
81
+ # Make sure b was NOT updated
82
+ test-tool chmtime --get b >new-mtime &&
83
+ test_cmp old-mtime new-mtime &&
84
84
85
85
git ls-files -s >index_files &&
86
86
test_line_count = 1 index_files &&
@@ -102,9 +102,14 @@ test_expect_success '1a-R: Modify(A)/Modify(B), change on B subset of A' '
102
102
103
103
git checkout B^0 &&
104
104
105
+ test-tool chmtime =-1 b &&
106
+ test-tool chmtime --get b >old-mtime &&
105
107
GIT_MERGE_VERBOSITY=3 git merge -s recursive A^0 >out 2>err &&
106
108
107
- test_i18ngrep "Auto-merging b" out &&
109
+ # Make sure b WAS updated
110
+ test-tool chmtime --get b >new-mtime &&
111
+ test $(cat old-mtime) -lt $(cat new-mtime) &&
112
+
108
113
test_must_be_empty err &&
109
114
110
115
git ls-files -s >index_files &&
@@ -165,10 +170,10 @@ test_expect_success '2a-L: Modify/rename, merge into modify side' '
165
170
166
171
git checkout A^0 &&
167
172
173
+ test_path_is_missing c &&
168
174
GIT_MERGE_VERBOSITY=3 git merge -s recursive B^0 >out 2>err &&
169
175
170
- test_i18ngrep ! "Skipped c" out &&
171
- test_must_be_empty err &&
176
+ test_path_is_file c &&
172
177
173
178
git ls-files -s >index_files &&
174
179
test_line_count = 1 index_files &&
@@ -193,9 +198,14 @@ test_expect_success '2a-R: Modify/rename, merge into rename side' '
193
198
194
199
git checkout B^0 &&
195
200
201
+ test-tool chmtime =-1 c &&
202
+ test-tool chmtime --get c >old-mtime &&
196
203
GIT_MERGE_VERBOSITY=3 git merge -s recursive A^0 >out 2>err &&
197
204
198
- test_i18ngrep ! "Skipped c" out &&
205
+ # Make sure c WAS updated
206
+ test-tool chmtime --get c >new-mtime &&
207
+ test $(cat old-mtime) -lt $(cat new-mtime) &&
208
+
199
209
test_must_be_empty err &&
200
210
201
211
git ls-files -s >index_files &&
@@ -256,16 +266,15 @@ test_expect_success '2b-L: Rename+Mod(A)/Mod(B), B mods subset of A' '
256
266
257
267
git checkout A^0 &&
258
268
259
- test-tool chmtime =31337 c &&
260
- test-tool chmtime -v +0 c >expected-mtime &&
261
-
269
+ test-tool chmtime =-1 c &&
270
+ test-tool chmtime --get c >old-mtime &&
262
271
GIT_MERGE_VERBOSITY=3 git merge -s recursive B^0 >out 2>err &&
263
272
264
- test_i18ngrep "Skipped c" out &&
265
273
test_must_be_empty err &&
266
274
267
- test-tool chmtime -v +0 c >actual-mtime &&
268
- test_cmp expected-mtime actual-mtime &&
275
+ # Make sure c WAS updated
276
+ test-tool chmtime --get c >new-mtime &&
277
+ test_cmp old-mtime new-mtime &&
269
278
270
279
git ls-files -s >index_files &&
271
280
test_line_count = 1 index_files &&
@@ -290,9 +299,12 @@ test_expect_success '2b-R: Rename+Mod(A)/Mod(B), B mods subset of A' '
290
299
291
300
git checkout B^0 &&
292
301
302
+ test_path_is_missing c &&
293
303
GIT_MERGE_VERBOSITY=3 git merge -s recursive A^0 >out 2>err &&
294
304
295
- test_i18ngrep "Auto-merging c" out &&
305
+ # Make sure c now present (and thus was updated)
306
+ test_path_is_file c &&
307
+
296
308
test_must_be_empty err &&
297
309
298
310
git ls-files -s >index_files &&
@@ -361,13 +373,18 @@ test_expect_success '2c: Modify b & add c VS rename b->c' '
361
373
362
374
git checkout A^0 &&
363
375
376
+ test-tool chmtime =-1 c &&
377
+ test-tool chmtime --get c >old-mtime &&
364
378
GIT_MERGE_VERBOSITY=3 &&
365
379
export GIT_MERGE_VERBOSITY &&
366
380
test_must_fail git merge -s recursive B^0 >out 2>err &&
367
381
368
382
test_i18ngrep "CONFLICT (rename/add): Rename b->c" out &&
369
- test_i18ngrep ! "Skipped c" out &&
370
- test_must_be_empty err
383
+ test_must_be_empty err &&
384
+
385
+ # Make sure c WAS updated
386
+ test-tool chmtime --get c >new-mtime &&
387
+ test $(cat old-mtime) -lt $(cat new-mtime)
371
388
372
389
# FIXME: rename/add conflicts are horribly broken right now;
373
390
# when I get back to my patch series fixing it and
@@ -460,11 +477,13 @@ test_expect_success '3a-L: bq_1->foo/bq_2 on A, foo/->bar/ on B' '
460
477
461
478
git checkout A^0 &&
462
479
480
+ test_path_is_missing bar/bq &&
463
481
GIT_MERGE_VERBOSITY=3 git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
464
482
465
- test_i18ngrep ! "Skipped bar/bq" out &&
466
483
test_must_be_empty err &&
467
484
485
+ test_path_is_file bar/bq &&
486
+
468
487
git ls-files -s >index_files &&
469
488
test_line_count = 2 index_files &&
470
489
@@ -488,11 +507,13 @@ test_expect_success '3a-R: bq_1->foo/bq_2 on A, foo/->bar/ on B' '
488
507
489
508
git checkout B^0 &&
490
509
510
+ test_path_is_missing bar/bq &&
491
511
GIT_MERGE_VERBOSITY=3 git -c merge.directoryRenames=true merge -s recursive A^0 >out 2>err &&
492
512
493
- test_i18ngrep ! "Skipped bar/bq" out &&
494
513
test_must_be_empty err &&
495
514
515
+ test_path_is_file bar/bq &&
516
+
496
517
git ls-files -s >index_files &&
497
518
test_line_count = 2 index_files &&
498
519
@@ -552,11 +573,13 @@ test_expect_success '3b-L: bq_1->foo/bq_2 on A, foo/->bar/ on B' '
552
573
553
574
git checkout A^0 &&
554
575
576
+ test_path_is_missing bar/bq &&
555
577
GIT_MERGE_VERBOSITY=3 git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
556
578
557
- test_i18ngrep ! "Skipped bar/bq" out &&
558
579
test_must_be_empty err &&
559
580
581
+ test_path_is_file bar/bq &&
582
+
560
583
git ls-files -s >index_files &&
561
584
test_line_count = 2 index_files &&
562
585
@@ -580,11 +603,13 @@ test_expect_success '3b-R: bq_1->foo/bq_2 on A, foo/->bar/ on B' '
580
603
581
604
git checkout B^0 &&
582
605
606
+ test_path_is_missing bar/bq &&
583
607
GIT_MERGE_VERBOSITY=3 git -c merge.directoryRenames=true merge -s recursive A^0 >out 2>err &&
584
608
585
- test_i18ngrep ! "Skipped bar/bq" out &&
586
609
test_must_be_empty err &&
587
610
611
+ test_path_is_file bar/bq &&
612
+
588
613
git ls-files -s >index_files &&
589
614
test_line_count = 2 index_files &&
590
615
@@ -654,16 +679,16 @@ test_expect_failure '4a: Change on A, change on B subset of A, dirty mods presen
654
679
git checkout A^0 &&
655
680
echo "File rewritten" >b &&
656
681
657
- test-tool chmtime =31337 b &&
658
- test-tool chmtime -v +0 b >expected -mtime &&
682
+ test-tool chmtime =-1 b &&
683
+ test-tool chmtime --get b >old -mtime &&
659
684
660
685
GIT_MERGE_VERBOSITY=3 git merge -s recursive B^0 >out 2>err &&
661
686
662
- test_i18ngrep "Skipped b" out &&
663
687
test_must_be_empty err &&
664
688
665
- test-tool chmtime -v +0 b >actual-mtime &&
666
- test_cmp expected-mtime actual-mtime &&
689
+ # Make sure b was NOT updated
690
+ test-tool chmtime --get b >new-mtime &&
691
+ test_cmp old-mtime new-mtime &&
667
692
668
693
git ls-files -s >index_files &&
669
694
test_line_count = 1 index_files &&
@@ -722,16 +747,16 @@ test_expect_success '4b: Rename+Mod(A)/Mod(B), change on B subset of A, dirty mo
722
747
git checkout A^0 &&
723
748
echo "File rewritten" >c &&
724
749
725
- test-tool chmtime =31337 c &&
726
- test-tool chmtime -v +0 c >expected -mtime &&
750
+ test-tool chmtime =-1 c &&
751
+ test-tool chmtime --get c >old -mtime &&
727
752
728
753
GIT_MERGE_VERBOSITY=3 git merge -s recursive B^0 >out 2>err &&
729
754
730
- test_i18ngrep "Skipped c" out &&
731
755
test_must_be_empty err &&
732
756
733
- test-tool chmtime -v +0 c >actual-mtime &&
734
- test_cmp expected-mtime actual-mtime &&
757
+ # Make sure c was NOT updated
758
+ test-tool chmtime --get c >new-mtime &&
759
+ test_cmp old-mtime new-mtime &&
735
760
736
761
git ls-files -s >index_files &&
737
762
test_line_count = 1 index_files &&
0 commit comments