summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/patch/patch.c
diff options
context:
space:
mode:
authorKelly Yancey <kbyanc@FreeBSD.org>2000-08-02 06:54:21 +0000
committerKelly Yancey <kbyanc@FreeBSD.org>2000-08-02 06:54:21 +0000
commitd1b04ce6b7bfd4d77ca5ba0d271a9d904107de65 (patch)
tree45a8292183ed0c403f716cc0887040522f39d11b /gnu/usr.bin/patch/patch.c
parent8eb3acc9be996f45358b20048eb44a322f0c2f6e (diff)
Fix patch such that skipping files does not count as a failure.
Previously, using -S/--skip, -f/--force, or -t/--batch to skip a patch in a patchset still registers a failure which causes patch to return a non-zero exit code. This is particularly undesirable with regards to ports as there is no way to ignore the non-zero code. (Luckily, we don't currently have any ports that make use of any of these options.) The PR (yes, my own) is slightly incorrect: It states that -f does indeed properly skip patches. It does, but it still sets the failure flag causing patch to return non-zero. PR: 19638 Submitted by: kbyanc@posi.net
Notes
svn path=/head/; revision=64120
Diffstat (limited to 'gnu/usr.bin/patch/patch.c')
-rw-r--r--gnu/usr.bin/patch/patch.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/gnu/usr.bin/patch/patch.c b/gnu/usr.bin/patch/patch.c
index 0e37ddb46461..0a32fa7a3243 100644
--- a/gnu/usr.bin/patch/patch.c
+++ b/gnu/usr.bin/patch/patch.c
@@ -313,7 +313,6 @@ char **argv;
newwhere = pch_newfirst() + last_offset;
if (skip_rest_of_patch) {
abort_hunk();
- failed++;
if (verbose)
say3("Hunk #%d ignored at %ld.\n", hunk, newwhere);
}