all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
To: Emacs developers <emacs-devel@gnu.org>
Cc: Michael Albinus <michael.albinus@gmx.de>,
	Dmitry Gutov <dgutov@yandex.ru>
Subject: [PATCH] Fix Git commits over Tramp on Windows
Date: Mon, 29 May 2017 19:11:38 +0300	[thread overview]
Message-ID: <1e8d8b3a-9c6e-d727-2a36-b95d895a5e3e@gmail.com> (raw)

[-- 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


             reply	other threads:[~2017-05-29 16:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-29 16:11 Nikolay Kudryavtsev [this message]
2017-05-29 17:41 ` [PATCH] Fix Git commits over Tramp on Windows Michael Albinus
2017-05-29 22:16   ` Dmitry Gutov
2017-06-03 15:53     ` Nikolay Kudryavtsev
2017-06-04  8:01 ` Michael Albinus

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

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

  git send-email \
    --in-reply-to=1e8d8b3a-9c6e-d727-2a36-b95d895a5e3e@gmail.com \
    --to=nikolay.kudryavtsev@gmail.com \
    --cc=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.de \
    /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 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.