From: Michael Albinus <michael.albinus@gmx.de>
To: Juri Linkov <juri@linkov.net>
Cc: Sam Steingold <sds@gnu.org>, 60011@debbugs.gnu.org
Subject: bug#60011: 30.0.50; git commit from *vc-diff* does not work over tramp
Date: Tue, 13 Dec 2022 19:33:25 +0100 [thread overview]
Message-ID: <87tu1zrw5m.fsf@gmx.de> (raw)
In-Reply-To: <86lenbw7w6.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 13 Dec 2022 19:16:17 +0200")
Juri Linkov <juri@linkov.net> writes:
> Hi Michael,
Hi Juri,
> Could you please confirm that I correctly implemented support for
> Tramp in the following patch.
No.
> diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
> index 83138a6d107..65604e84d0e 100644
> --- a/lisp/vc/vc-git.el
> +++ b/lisp/vc/vc-git.el
> @@ -103,6 +103,7 @@
> (require 'vc-dispatcher)
> (eval-when-compile
> (require 'subr-x) ; for string-trim-right
> + (require 'tramp)
> (require 'vc)
> (require 'vc-dir))
>
> @@ -1048,7 +1049,13 @@ vc-git-checkin
> (string-replace file-diff "" vc-git-patch-string))
> (user-error "Index not empty"))
> (setq pos (point))))))
> - (let ((patch-file (make-temp-file "git-patch")))
> + (let ((patch-file
> + (if (file-remote-p default-directory)
> + (with-parsed-tramp-file-name
> + (expand-file-name default-directory) nil
> + (tramp-make-tramp-file-name
> + v (with-no-warnings (tramp-make-tramp-temp-file v))))
> + (make-temp-file "git-patch"))))
> (with-temp-file patch-file
> (insert vc-git-patch-string))
> (unwind-protect
Please don't use Tramp internal functions. As somebody else said in
this thread, make-nearby-temp-file should be good enough.
Best regards, Michael.
next prev parent reply other threads:[~2022-12-13 18:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-12 16:31 bug#60011: 30.0.50; git commit from *vc-diff* does not work over tramp Sam Steingold
2022-12-12 18:29 ` Juri Linkov
2022-12-13 17:16 ` Juri Linkov
2022-12-13 18:33 ` Michael Albinus [this message]
2022-12-14 8:06 ` Juri Linkov
2022-12-14 21:58 ` Sam Steingold
2022-12-15 7:27 ` Juri Linkov
2022-12-16 7:52 ` Juri Linkov
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=87tu1zrw5m.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=60011@debbugs.gnu.org \
--cc=juri@linkov.net \
--cc=sds@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).