git-am and CRLF

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

 



I recently tried to apply a patch-series to a repo that is
unfortunately full of CRLF files, and was a bit surprised that it
didn't work at all.

So I made a small repro-case, and it seems CRLF new-lines is indeed
the problem. Any clue how to fix it? The way I see it, we should
simply be able top treat the CR as any other character, and succeed.
But that doesn't seem to happen...

git init test &&
(
        cd test/ &&
        git config core.autocrlf false &&
        printf "%s\r\n%s\r\n" "foo" "bar" > test.txt &&
        git add test.txt &&
        git commit -m. &&
        printf "%s\r\n%s\r\n%s\r\n" "foo" "baz" "bar" > test.txt &&
        git commit -am. &&
        git format-patch -1 &&
        git reset --hard HEAD^ &&
        git am 0001-.patch
)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]