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:
parent
88d552055b
commit
cb63dc7adf
@ -1,6 +1,6 @@
|
|||||||
From: Jean Delvare <jdelvare@suse.de>
|
From: Jean Delvare <jdelvare@suse.de>
|
||||||
Subject: Drop useless test in another_hunk()
|
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
|
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
|
equivalent code path for context patches doesn't have this test so I
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
From: Jean Delvare <jdelvare@suse.de>
|
From: Steven Rostedt <rostedt@goodmis.org>
|
||||||
Subject: Preserve C function name in unified rejects
|
Subject: Preserve function names in reject files
|
||||||
Upstream: Submitted (2014-11-10)
|
Upstream: Committed (a2f4bfe0f3f54181a8f1077cde9ebef0b4f891c0)
|
||||||
References: bnc#904519
|
References: bnc#904519
|
||||||
|
|
||||||
We already support that in context rejects, just do the same for
|
* src/patch.c (main): Preserve function names in reject files.
|
||||||
unified rejects.
|
* tests/reject-format: Update the test case.
|
||||||
---
|
---
|
||||||
src/patch.c | 3 ++-
|
src/patch.c | 3 ++-
|
||||||
tests/preserve-c-function-names | 16 ++++++++++++++++
|
tests/reject-format | 4 ++--
|
||||||
tests/reject-format | 4 ++--
|
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||||
3 files changed, 20 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
--- a/src/patch.c
|
--- a/src/patch.c
|
||||||
+++ b/src/patch.c
|
+++ b/src/patch.c
|
||||||
@ -30,35 +29,6 @@ unified rejects.
|
|||||||
|
|
||||||
while (pch_char (new) == '=' || pch_char (new) == '\n')
|
while (pch_char (new) == '=' || pch_char (new) == '\n')
|
||||||
new++;
|
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
|
--- a/tests/reject-format
|
||||||
+++ b/tests/reject-format
|
+++ b/tests/reject-format
|
||||||
@@ -79,7 +79,7 @@ check 'cat f.rej' <<EOF
|
@@ -79,7 +79,7 @@ check 'cat f.rej' <<EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user