@@ -243,8 +243,7 @@ test_expect_success 'merge of identical changes in a renamed file' '
243
243
git reset --hard &&
244
244
git checkout change+rename &&
245
245
246
- test-tool chmtime =31337 B &&
247
- test-tool chmtime --get B >old-mtime &&
246
+ test-tool chmtime --get -3600 B >old-mtime &&
248
247
GIT_MERGE_VERBOSITY=3 git merge change >out &&
249
248
250
249
test-tool chmtime --get B >new-mtime &&
@@ -253,10 +252,12 @@ test_expect_success 'merge of identical changes in a renamed file' '
253
252
git reset --hard HEAD^ &&
254
253
git checkout change &&
255
254
256
- test-tool chmtime =-1 M &&
257
- test-tool chmtime --get M >old-mtime &&
255
+ # A will be renamed to B; we check mtimes and file presence
256
+ test_path_is_missing B &&
257
+ test-tool chmtime --get -3600 A >old-mtime &&
258
258
GIT_MERGE_VERBOSITY=3 git merge change+rename >out &&
259
259
260
+ test_path_is_missing A &&
260
261
test-tool chmtime --get B >new-mtime &&
261
262
test $(cat old-mtime) -lt $(cat new-mtime)
262
263
'
@@ -645,7 +646,7 @@ test_expect_success 'setup avoid unnecessary update, normal rename' '
645
646
646
647
test_expect_success ' avoid unnecessary update, normal rename' '
647
648
git checkout -q avoid-unnecessary-update-1^0 &&
648
- test-tool chmtime --get =1000000000 rename >expect &&
649
+ test-tool chmtime --get -3600 rename >expect &&
649
650
git merge merge-branch-1 &&
650
651
test-tool chmtime --get rename >actual &&
651
652
test_cmp expect actual # "rename" should have stayed intact
@@ -677,7 +678,7 @@ test_expect_success 'setup to test avoiding unnecessary update, with D/F conflic
677
678
678
679
test_expect_success ' avoid unnecessary update, with D/F conflict' '
679
680
git checkout -q avoid-unnecessary-update-2^0 &&
680
- test-tool chmtime --get =1000000000 df >expect &&
681
+ test-tool chmtime --get -3600 df >expect &&
681
682
git merge merge-branch-2 &&
682
683
test-tool chmtime --get df >actual &&
683
684
test_cmp expect actual # "df" should have stayed intact
@@ -708,7 +709,7 @@ test_expect_success 'setup avoid unnecessary update, dir->(file,nothing)' '
708
709
709
710
test_expect_success ' avoid unnecessary update, dir->(file,nothing)' '
710
711
git checkout -q master^0 &&
711
- test-tool chmtime --get =1000000000 df >expect &&
712
+ test-tool chmtime --get -3600 df >expect &&
712
713
git merge side &&
713
714
test-tool chmtime --get df >actual &&
714
715
test_cmp expect actual # "df" should have stayed intact
@@ -737,7 +738,7 @@ test_expect_success 'setup avoid unnecessary update, modify/delete' '
737
738
738
739
test_expect_success ' avoid unnecessary update, modify/delete' '
739
740
git checkout -q master^0 &&
740
- test-tool chmtime --get =1000000000 file >expect &&
741
+ test-tool chmtime --get -3600 file >expect &&
741
742
test_must_fail git merge side &&
742
743
test-tool chmtime --get file >actual &&
743
744
test_cmp expect actual # "file" should have stayed intact
@@ -765,7 +766,7 @@ test_expect_success 'setup avoid unnecessary update, rename/add-dest' '
765
766
766
767
test_expect_success ' avoid unnecessary update, rename/add-dest' '
767
768
git checkout -q master^0 &&
768
- test-tool chmtime --get =1000000000 newfile >expect &&
769
+ test-tool chmtime --get -3600 newfile >expect &&
769
770
git merge side &&
770
771
test-tool chmtime --get newfile >actual &&
771
772
test_cmp expect actual # "file" should have stayed intact
0 commit comments