| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# This is a filterdiff(1) testcase. |
| 4 |
# Handle git format-patch output containing remove-file diffs. |
| 5 |
# From: https://bugzilla.redhat.com/show_bug.cgi?id=1226985 |
| 6 |
|
| 7 |
. ${top_srcdir-.}/tests/common.sh |
| 8 |
|
| 9 |
cat <<"EOF" > git-output |
| 10 |
diff --git a/a b/a |
| 11 |
deleted file mode 100644 |
| 12 |
index 7898192..0000000 |
| 13 |
--- a/a |
| 14 |
+++ /dev/null |
| 15 |
@@ -1 +0,0 @@ |
| 16 |
-a |
| 17 |
EOF |
| 18 |
|
| 19 |
${FILTERDIFF} git-output 2>errors >output || { cat errors; exit 1; } |
| 20 |
[ -s errors ] && { cat errors; exit 1; } |
| 21 |
cmp git-output output || exit 1 |
| 22 |
exit 0 |