What is causing git am to fail when format-patch included an unchanged line as a changed line?

52 views Asked by At

After using git format-patch the following snippet appeared in my patch files.

@@ -1,4 +1,4 @@
-using Chicken.Nuggets;
+using Chicken.Nuggets;

Both the added and removed lines ended with a crlf line ending. This was also the first line of the file both times I encountered this issue.

When I attempted to use the patch file with git am --ignore-whitespace *.patch the patches with segments similar to the above would fail. I was able to easily get around the issue by removing the sections containing the unchanged changed lines, but was hoping that somebody could at least explain what could have happened, as I don't think that should have shown as a changed line in the first place and I also don't understand why applying the patch would fail since I wouldn't expect it to matter what the old and new lines were.

0

There are 0 answers