gpt4 book ai didi

svn - 应用补丁时忽略行尾差异

转载 作者:行者123 更新时间:2023-12-04 14:29:04 26 4
gpt4 key购买 nike

是否可以在应用补丁时忽略 EOL 差异?

(在windows机器打补丁,linux打补丁的情况)

谢谢。

最佳答案

发件人:How do I get patch to ignore carriage returns?

Try using the --binary option, from the manpage (emphasis mine)

--binary

Write all files in binary mode, except for standard output and /dev/tty. When reading, disable the heuristic for transforming CRLF line endings into LF line endings. (On POSIX -conforming systems, reads and writes never transform line endings. On Windows, reads and writes do transform line endings by default, and patches should be generated by diff --binary when line endings are significant.)

我不完全理解上面的内容,但它在 Linux 机器上对我有用,可以将 Unix 补丁应用到 DOS 文件上。

关于svn - 应用补丁时忽略行尾差异,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8210062/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com