From fb1c18fc466c6a9c6ea1b072c9db93c0046f4cbd Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Wed, 19 Feb 2020 17:04:07 +0000 Subject: merge-recursive: fix the refresh logic in update_file_flags If we need to delete a higher stage entry in the index to place the file at stage 0, then we'll lose that file's stat information. In such situations we may still be able to detect that the file on disk is the version we want (as noted by our comment in the code: /* do not overwrite file if already present */ ), but we do still need to update the mtime since we are creating a new cache_entry for that file. Update the logic used to determine whether we refresh a file's mtime. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- t/t3433-rebase-across-mode-change.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't') diff --git a/t/t3433-rebase-across-mode-change.sh b/t/t3433-rebase-across-mode-change.sh index f11fc35c3e..05df964670 100755 --- a/t/t3433-rebase-across-mode-change.sh +++ b/t/t3433-rebase-across-mode-change.sh @@ -33,7 +33,7 @@ test_expect_success 'rebase changes with the apply backend' ' git rebase side1 ' -test_expect_failure 'rebase changes with the merge backend' ' +test_expect_success 'rebase changes with the merge backend' ' test_when_finished "git rebase --abort || true" && git checkout -b merge-backend side2 && git rebase -m side1 -- cgit v1.2.3