Skip to contentSkip to conversation

git-apply and git-am should provide better errors when changelog is missing

PATCH Timur Tabi 1 participant 1 message Jun 15, 2016

Subsystems (2)
lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

I was trying to apply a patch, and I kept getting this odd error:

I'm trying to apply a patch, and I get this error message:

git-apply --stat mpc86xx.patch
fatal: git-apply: bad git-diff - expected /dev/null on line 55

When I take a look at line 55 of mpc86xx.patch, I see this:

# Yes MCA RS/6000s exist but Linux-PPC does not currently support any config MCA

arch/powerpc/boot/dts/mpc86xx.dts new file +4 -0
new file mode 100644
index 0000000..a8a13b4
@@ -0,0 +1,187 @@
+/*
+ * MPC86xx Device Tree Source
+ *
+ * Copyright 2007 Freescale Semiconductor Inc.

So obviously, I was confused. Well, I figured out the problem. The patch did not include a changelog. All it had was this:

From b878a6b32a733e72a771fffd632f57b08808fc7f Mon Sep 17 00:00:00 2001
From: xxx <[email protected]>
Date: Tue, 19 Jun 2007 12:55:59 -0500
Subject: [PATCH] Added MPC86xx Support

---
 arch/powerpc/Kconfig                        |    3 +-

Could someone please update the git-am and git-apply code to provide a better error message in this situation? Thanks.

Signature · 2 lines
Timur Tabi
Linux Kernel Developer @ Freescale