[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#66211: 30.0.50; C-x v v in vc-diff does not work with lesser version
From: |
Alfred M. Szmidt |
Subject: |
bug#66211: 30.0.50; C-x v v in vc-diff does not work with lesser versionf of patch |
Date: |
Tue, 26 Sep 2023 08:43:32 -0400 |
> 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.
bug#66211: 30.0.50; C-x v v in vc-diff does not work with lesser versionf of patch, Eli Zaretskii, 2023/09/29