From: lilinchao@oschina.cn Date: Tue, 27 Jul 2021 14:07:32 GMT Subject: git apply --3way behaves abnormally when the patch contains binary changes. Message-ID: I see the latest change about `git apply --3way` is 923cd87, but it doesn't seem to have been fully tested (in t4108-apply-threeway.sh). On latest Git version 2.32.0, consider test case below: " test_expect_success 'apply binary file patch with --3way' '         # 1. on new branch, commit binary file          git checkout -b left &&         cat "$TEST_DIRECTORY"/test-binary-1.png >bin.png &&         git add bin.png &&         git commit -m "add binary file" &&         # 2. based on left_bin branch, make any change, and commit         git checkout -b right &&         cat bin.png bin.png > bin.png &&         git add bin.png &&         git commit -m "update binary file" &&         # 3. make patch         git diff --binary left..right >bin.diff &&         # apply --3way, and it will fail         test_must_fail git apply --index --3way bin.diff ' " But  "git apply --index --3way bin.diff" will not faill on Git version 2.31.0.