Blame SOURCES/patchutils-bz1226985.patch

83836c
diff -up patchutils-0.3.4/Makefile.am.bz1226985 patchutils-0.3.4/Makefile.am
83836c
--- patchutils-0.3.4/Makefile.am.bz1226985	2015-04-14 17:32:18.000000000 +0100
83836c
+++ patchutils-0.3.4/Makefile.am	2015-06-09 17:13:52.497904051 +0100
83836c
@@ -216,7 +216,8 @@ TESTS = tests/newline1/run-test \
83836c
 	tests/stdin/run-test \
83836c
 	tests/splitdiffD/run-test \
83836c
 	tests/fullheader1/run-test \
83836c
-	tests/fullheader2/run-test
83836c
+	tests/fullheader2/run-test \
83836c
+	tests/fullheader3/run-test
83836c
 
83836c
 # These ones don't work yet.
83836c
 # Feel free to send me patches. :-)
83836c
diff -up patchutils-0.3.4/src/filterdiff.c.bz1226985 patchutils-0.3.4/src/filterdiff.c
83836c
--- patchutils-0.3.4/src/filterdiff.c.bz1226985	2015-04-14 17:13:07.000000000 +0100
83836c
+++ patchutils-0.3.4/src/filterdiff.c	2015-06-09 17:13:52.498904087 +0100
83836c
@@ -910,7 +910,7 @@ out:
83836c
 	return ret;
83836c
 }
83836c
 
83836c
-#define MAX_HEADERS 5
83836c
+#define MAX_HEADERS 6
83836c
 static int filterdiff (FILE *f, const char *patchname)
83836c
 {
83836c
 	static unsigned long linenum = 1;
83836c
diff -up patchutils-0.3.4/tests/fullheader3/run-test.bz1226985 patchutils-0.3.4/tests/fullheader3/run-test
83836c
--- patchutils-0.3.4/tests/fullheader3/run-test.bz1226985	2015-06-09 17:13:52.498904087 +0100
83836c
+++ patchutils-0.3.4/tests/fullheader3/run-test	2015-06-09 17:13:52.498904087 +0100
83836c
@@ -0,0 +1,22 @@
83836c
+#!/bin/sh
83836c
+
83836c
+# This is a filterdiff(1) testcase.
83836c
+# Handle git format-patch output containing remove-file diffs.
83836c
+# From: https://bugzilla.redhat.com/show_bug.cgi?id=1226985
83836c
+
83836c
+. ${top_srcdir-.}/tests/common.sh
83836c
+
83836c
+cat <<"EOF" > git-output
83836c
+diff --git a/a b/a
83836c
+deleted file mode 100644
83836c
+index 7898192..0000000
83836c
+--- a/a
83836c
++++ /dev/null
83836c
+@@ -1 +0,0 @@
83836c
+-a
83836c
+EOF
83836c
+
83836c
+${FILTERDIFF} git-output 2>errors >output || { cat errors; exit 1; }
83836c
+[ -s errors ] && { cat errors; exit 1; }
83836c
+cmp git-output output || exit 1
83836c
+exit 0