$ vim patch
Index: toPatch
===================================================================
--- toPatch
+++ toPatch
@@ -2,4 +2,4 @@
*/
-final public class XMLWriter {
+public class XMLWriter {
$ vim toPatch
*/
final public class XMLWriter {
public static float CURRENT_VERSION=2.2f;
$ patch -p0 -ui patch
patching file toPatch
Hunk #1 succeeded at 1 with fuzz 2 (offset -1 lines).
爲什麼絨毛和線偏移?這是一個試圖理解差異和補丁的演示案例,因爲工具有時/通常不像預期的那樣工作。爲什麼此修補程序應用了1的模糊,並且失敗且模糊爲0?
當時仍然不確定實際的問題..我剛剛搬到 – simpatico 2011-11-11 19:00:59
這發生在我身上時,將補丁文件內容複製/粘貼到我的編輯器中。一些行只有空格,但它們被修剪爲空行,所以補丁文件應用正確,但有模糊因素警告...... – Julien 2016-01-27 15:33:13