SHA256
1
0
forked from pool/patch

Update upstream status.

OBS-URL: https://build.opensuse.org/package/show/devel:tools/patch?expand=0&rev=42
This commit is contained in:
Jean Delvare 2014-11-10 11:45:21 +00:00 committed by Git OBS Bridge
parent 88d552055b
commit cb63dc7adf
2 changed files with 9 additions and 39 deletions

View File

@ -1,6 +1,6 @@
From: Jean Delvare <jdelvare@suse.de>
Subject: Drop useless test in another_hunk()
Upstream: Submitted (2014-11-10)
Upstream: Committed (65193f1cc1bf38bdd63d1f3087b0d7e16ad3f082)
This test will always succeed so it is either broken or useless. The
equivalent code path for context patches doesn't have this test so I

View File

@ -1,15 +1,14 @@
From: Jean Delvare <jdelvare@suse.de>
Subject: Preserve C function name in unified rejects
Upstream: Submitted (2014-11-10)
From: Steven Rostedt <rostedt@goodmis.org>
Subject: Preserve function names in reject files
Upstream: Committed (a2f4bfe0f3f54181a8f1077cde9ebef0b4f891c0)
References: bnc#904519
We already support that in context rejects, just do the same for
unified rejects.
* src/patch.c (main): Preserve function names in reject files.
* tests/reject-format: Update the test case.
---
src/patch.c | 3 ++-
tests/preserve-c-function-names | 16 ++++++++++++++++
tests/reject-format | 4 ++--
3 files changed, 20 insertions(+), 3 deletions(-)
2 files changed, 4 insertions(+), 3 deletions(-)
--- a/src/patch.c
+++ b/src/patch.c
@ -30,35 +29,6 @@ unified rejects.
while (pch_char (new) == '=' || pch_char (new) == '\n')
new++;
--- a/tests/preserve-c-function-names
+++ b/tests/preserve-c-function-names
@@ -34,6 +34,7 @@ EOF
preserve_trailing_blank=
diff -p -c -L a -L b a b > ab.diff
+diff -p -u -L a -L b a b > ab-unified.diff
touch c
check 'patch c < ab.diff || cat c.rej' <<EOF
patching file c
@@ -55,3 +56,18 @@ Hunk #1 FAILED at 2.
! return 2;
}
EOF
+rm -f c.rej
+check 'patch c < ab-unified.diff || cat c.rej' <<EOF
+patching file c
+Hunk #1 FAILED at 2.
+1 out of 1 hunk FAILED -- saving rejects to file c.rej
+--- a
++++ b
+@@ -2,5 +2,5 @@ int foo()
+ {
+ /* waste a line */
+ $preserve_trailing_blank
+- return 1;
++ return 2;
+ }
+EOF
--- a/tests/reject-format
+++ b/tests/reject-format
@@ -79,7 +79,7 @@ check 'cat f.rej' <<EOF