git apply --3way behaves abnormally when the patch contains binary changes.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux