Commit b50ec27a authored by Noam Postavsky's avatar Noam Postavsky

Don't apply w32 env hacks for remote repositories

parent 353f6c81
......@@ -363,15 +363,22 @@ conversion."
(apply #'process-file args)))
(defun magit-process-environment ()
(append magit-git-environment
(cdr (assoc magit-git-executable magit-git-w32-path-hack))
(and magit-need-cygwin-noglob
(mapcar (lambda (var)
(concat var "=" (--if-let (getenv var)
(concat it " noglob")
"noglob")))
'("CYGWIN" "MSYS")))
process-environment))
;; The various w32 hacks are only applicable when running on the
;; local machine. As of Emacs 25.1, a local binding of
;; process-environment different from the top-level value affects
;; the environment used in
;; tramp-sh-handle-{start-file-process,process-file}.
(let ((local (not (file-remote-p default-directory))))
(append magit-git-environment
(and local
(cdr (assoc magit-git-executable magit-git-w32-path-hack)))
(and local magit-need-cygwin-noglob
(mapcar (lambda (var)
(concat var "=" (--if-let (getenv var)
(concat it " noglob")
"noglob")))
'("CYGWIN" "MSYS")))
process-environment)))
(defvar magit-this-process nil)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment