forked from pool/patch
3b8bf5d048
+ Support for most features of the "diff --git" format: renames and copies, permission changes, symlink diffs. (Binary diffs are not supported yet; patch will complain and skip them.) + Support for double-quoted filenames: when a filename in a context diff starts with a double quote, it is interpreted as a C string literal. The escape sequences \\, \", \a, \b, \f, \n, \r, \t, \v, and \ooo (a three-digit octal number between 0 and 255) are recognized. + Refuse to patch read-only files by default, or at least warn when patching such files with --force or --batch. + Refuse to apply a normal patch to a symlink. (Previous versions of patch were wrongly replacing the symlink with a regular file.) + When a timestamp specifies a time zone, honor that instead of assuming the local time zone (--set-date) or Universal Coordinated Time (--set-utc). + Support for nanosecond precision timestamps. + Many portability and bug fixes. OBS-URL: https://build.opensuse.org/package/show/devel:tools/patch?expand=0&rev=14
25 lines
833 B
Diff
25 lines
833 B
Diff
Index: patch-2.6.1.64-4762/src/patch.c
|
|
===================================================================
|
|
--- patch-2.6.1.64-4762.orig/src/patch.c
|
|
+++ patch-2.6.1.64-4762/src/patch.c
|
|
@@ -622,6 +622,7 @@ static struct option const longopts[] =
|
|
{"posix", no_argument, NULL, CHAR_MAX + 7},
|
|
{"quoting-style", required_argument, NULL, CHAR_MAX + 8},
|
|
{"reject-format", required_argument, NULL, CHAR_MAX + 9},
|
|
+ {"unified-reject-files", no_argument, NULL, CHAR_MAX + 1001},
|
|
{NULL, no_argument, NULL, 0}
|
|
};
|
|
|
|
@@ -902,6 +903,11 @@ get_some_switches (void)
|
|
else
|
|
usage (stderr, 2);
|
|
break;
|
|
+ case CHAR_MAX + 1001:
|
|
+ say ("warning: the `--unified-reject-files' option is obsolete; use "
|
|
+ "`--reject-format=unified' instead\n");
|
|
+ reject_format = UNI_DIFF;
|
|
+ break;
|
|
default:
|
|
usage (stderr, 2);
|
|
}
|