unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: "Alfred M. Szmidt" <ams@gnu.org>
Cc: 66211@debbugs.gnu.org
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 16:38:28 +0300	[thread overview]
Message-ID: <9ea150f8-eb57-b44a-146b-ea6addf26cfc@gutov.dev> (raw)
In-Reply-To: <E1ql7PY-0001Ku-Re@fencepost.gnu.org>

On 26/09/2023 15:43, Alfred M. Szmidt wrote:
>     > 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?

All right. Does this work for you?

diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 2f4b028bb4a..356da5ddfac 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1724,7 +1724,8 @@ vc-default-checkin-patch
                                               nil
                                               "-p1"
                                               "-r" null-device
-                                             "--no-backup-if-mismatch"
+                                             "--posix"
+                                             "--remove-empty-files"
                                               "-i" "-"))
                (user-error "Patch failed: %s" (buffer-string))))
            (vc-call-backend backend 'checkin files comment))






  reply	other threads:[~2023-09-26 13:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26 12:17 bug#66211: 30.0.50; C-x v v in vc-diff does not work with lesser versionf of patch Alfred M. Szmidt
2023-09-26 12:38 ` Dmitry Gutov
2023-09-26 12:43   ` Alfred M. Szmidt
2023-09-26 13:38     ` Dmitry Gutov [this message]
2023-09-26 15:08       ` Alfred M. Szmidt
2023-09-26 16:30         ` Dmitry Gutov
2023-09-26 16:51           ` Alfred M. Szmidt
2023-10-07 22:33         ` Dmitry Gutov
2023-10-08  5:01           ` Eli Zaretskii
2023-10-14 17:10             ` Dmitry Gutov
2023-09-29  7:05 ` Eli Zaretskii
2023-09-29 10:22   ` Dmitry Gutov
2023-09-29 15:22     ` Eli Zaretskii
2023-09-29 17:27       ` Dmitry Gutov
2023-09-29 17:40         ` Eli Zaretskii
2023-09-29 18:11           ` Dmitry Gutov
2023-09-29 18:36         ` Alfred M. Szmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ea150f8-eb57-b44a-146b-ea6addf26cfc@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=66211@debbugs.gnu.org \
    --cc=ams@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).