all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] Fix Git commits over Tramp on Windows
@ 2017-05-29 16:11 Nikolay Kudryavtsev
  2017-05-29 17:41 ` Michael Albinus
  2017-06-04  8:01 ` Michael Albinus
  0 siblings, 2 replies; 5+ messages in thread
From: Nikolay Kudryavtsev @ 2017-05-29 16:11 UTC (permalink / raw)
  To: Emacs developers; +Cc: Michael Albinus, Dmitry Gutov

[-- Attachment #1: Type: text/plain, Size: 186 bytes --]

Hello.

I noticed that that bug with vc git commits not working on windows still 
isn't patched on master. Any objections to the following patch?

-- 
Best Regards,
Nikolay Kudryavtsev


[-- Attachment #2: 0001-Fix-Git-commits-over-Tramp-on-Windows.patch --]
[-- Type: text/plain, Size: 1514 bytes --]

From 20d6e24e8879add8e14aefd6beba486b38f188d8 Mon Sep 17 00:00:00 2001
From: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
Date: Mon, 29 May 2017 18:59:08 +0300
Subject: [PATCH] Fix Git commits over Tramp on Windows

* lisp/vc/vc-git.el (vc-git-checkin): Use file-local-name only when calling
git commit.
---
 lisp/vc/vc-git.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index a4ce76ec37..cc3e295641 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -798,14 +798,15 @@ vc-git-checkin
           ;; message.  Handle also remote files.
           (if (eq system-type 'windows-nt)
               (let ((default-directory (file-name-directory file1)))
-                (file-local-name (make-nearby-temp-file "git-msg"))))))
+                (make-nearby-temp-file "git-msg")))))
     (cl-flet ((boolean-arg-fn
                (argument)
                (lambda (value) (when (equal value "yes") (list argument)))))
       ;; When operating on the whole tree, better pass "-a" than ".", since "."
       ;; fails when we're committing a merge.
       (apply 'vc-git-command nil 0 (if only files)
-             (nconc (if msg-file (list "commit" "-F" msg-file)
+             (nconc (if msg-file (list "commit" "-F"
+                                       (file-local-name msg-file))
                       (list "commit" "-m"))
                     (let ((args
                            (log-edit-extract-headers
-- 
2.13.0.windows.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-06-04  8:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-29 16:11 [PATCH] Fix Git commits over Tramp on Windows Nikolay Kudryavtsev
2017-05-29 17:41 ` Michael Albinus
2017-05-29 22:16   ` Dmitry Gutov
2017-06-03 15:53     ` Nikolay Kudryavtsev
2017-06-04  8:01 ` Michael Albinus

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.