git-am cannot apply git format-patch -M

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

 



I've created a series of patches for my local commits using:

git format-patch -M -C ...

The resulting patch files contain hunks like:

diff --git a/file1 b/file2
similarity index 93% 
rename from file1
rename to file2
index 7cf3a09..88c9c13 100644
--- a/file1
+++ b/file2
[...]

git-am fails at applying these hunks, failing with:

Applying: [commit description]
fatal: git apply: bad git-diff - inconsistent old filename on line 109
Patch failed at [HEAD commit]
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".

Additionally, I'd like to report that the line number reported by git-am in this error message does not reflect the actual line number of the problem in the patch file.  The reported line number is offset by -[amount of lines before the [---] line in the patch file], which makes understanding the error message hard, confusing and potentially misleading.--
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]