views:

13

answers:

1

I am using patch from UnxUtils (on Windows), which works (my file patches fine) but the outputted file has LF instead of CRLF line endings. Is there an equivilent to patch which outputs using CRLF instead of LF?

A: 

Aha, turns out I was looking for the --binary option.

patch -p0 --binary < my.cpp.diff

FYI, this works with patches generated from this command:

diff -ac --binary path\to\my.cpp path\to\my.cpp.mine > my.cpp.diff
nbolton