@@ -243,8 +243,7 @@ test_expect_success 'merge of identical changes in a renamed file' '
243243 git reset --hard &&
244244 git checkout change+rename &&
245245
246- test-tool chmtime =31337 B &&
247- test-tool chmtime --get B >old-mtime &&
246+ test-tool chmtime --get -3600 B >old-mtime &&
248247 GIT_MERGE_VERBOSITY=3 git merge change >out &&
249248
250249 test-tool chmtime --get B >new-mtime &&
@@ -253,10 +252,12 @@ test_expect_success 'merge of identical changes in a renamed file' '
253252 git reset --hard HEAD^ &&
254253 git checkout change &&
255254
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 &&
258258 GIT_MERGE_VERBOSITY=3 git merge change+rename >out &&
259259
260+ test_path_is_missing A &&
260261 test-tool chmtime --get B >new-mtime &&
261262 test $(cat old-mtime) -lt $(cat new-mtime)
262263'
@@ -645,7 +646,7 @@ test_expect_success 'setup avoid unnecessary update, normal rename' '
645646
646647test_expect_success ' avoid unnecessary update, normal rename' '
647648 git checkout -q avoid-unnecessary-update-1^0 &&
648- test-tool chmtime --get =1000000000 rename >expect &&
649+ test-tool chmtime --get -3600 rename >expect &&
649650 git merge merge-branch-1 &&
650651 test-tool chmtime --get rename >actual &&
651652 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
677678
678679test_expect_success ' avoid unnecessary update, with D/F conflict' '
679680 git checkout -q avoid-unnecessary-update-2^0 &&
680- test-tool chmtime --get =1000000000 df >expect &&
681+ test-tool chmtime --get -3600 df >expect &&
681682 git merge merge-branch-2 &&
682683 test-tool chmtime --get df >actual &&
683684 test_cmp expect actual # "df" should have stayed intact
@@ -708,7 +709,7 @@ test_expect_success 'setup avoid unnecessary update, dir->(file,nothing)' '
708709
709710test_expect_success ' avoid unnecessary update, dir->(file,nothing)' '
710711 git checkout -q master^0 &&
711- test-tool chmtime --get =1000000000 df >expect &&
712+ test-tool chmtime --get -3600 df >expect &&
712713 git merge side &&
713714 test-tool chmtime --get df >actual &&
714715 test_cmp expect actual # "df" should have stayed intact
@@ -737,7 +738,7 @@ test_expect_success 'setup avoid unnecessary update, modify/delete' '
737738
738739test_expect_success ' avoid unnecessary update, modify/delete' '
739740 git checkout -q master^0 &&
740- test-tool chmtime --get =1000000000 file >expect &&
741+ test-tool chmtime --get -3600 file >expect &&
741742 test_must_fail git merge side &&
742743 test-tool chmtime --get file >actual &&
743744 test_cmp expect actual # "file" should have stayed intact
@@ -765,7 +766,7 @@ test_expect_success 'setup avoid unnecessary update, rename/add-dest' '
765766
766767test_expect_success ' avoid unnecessary update, rename/add-dest' '
767768 git checkout -q master^0 &&
768- test-tool chmtime --get =1000000000 newfile >expect &&
769+ test-tool chmtime --get -3600 newfile >expect &&
769770 git merge side &&
770771 test-tool chmtime --get newfile >actual &&
771772 test_cmp expect actual # "file" should have stayed intact
0 commit comments