GNU bug report logs -
#66211
30.0.50; C-x v v in vc-diff does not work with lesser versionf of patch
Previous Next
Reported by: "Alfred M. Szmidt" <ams <at> gnu.org>
Date: Tue, 26 Sep 2023 12:19:02 UTC
Severity: normal
Found in version 30.0.50
Done: Dmitry Gutov <dmitry <at> gutov.dev>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 66211 <at> debbugs.gnu.org (full text, mbox):
> The C-x v v command in a*vc-diff* buffer does not work if you have a
> lesser version of patch, e.g., the one on OpenBSD:
>
> user-error: Patch failed: patch: unknown option -- no-backup-if-mismatch
> usage: patch [-bCcEeflNnRstuv] [-B backup-prefix] [-D symbol] [-d directory]
> [-F max-fuzz] [-i patchfile] [-o out-file] [-p strip-count]
> [-r rej-name] [-V t | nil | never] [-x number] [-z backup-ext]
> [--posix] [origfile [patchfile]]
> patch <patchfile
Thanks for the report.
Any idea how to implement the same thing using your version of 'patch'?
Maybe just pass --posix for both GNU patch and other patch?
From the GNU patch manual:
The --no-backup-if-mismatch option causes patch to not create backup
files, even for mismatched patches; this is the default when
conforming to POSIX.
Scoundering the patch(1) man page:
-b, --backup
Save a backup copy of the file before it is modified. By default
the original file is saved with a backup extension of ".orig"
unless the file already has a numbered backup, in which case a
numbered backup is made. This is equivalent to specifying "-V
existing". This option is currently the default, unless --posix
is specified.
And looking further, --posix:
--posix
Enables strict IEEE Std 1003.1-2008 ("POSIX.1") conformance,
specifically:
1. Backup files are not created unless the -b option is
specified.
2. If unspecified, the file name used is the first of the old,
new and index files that exists.
This bug report was last modified 1 year and 218 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.