aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2016-06-22 02:04:33 +0300
committerDmitry Gutov2016-06-22 02:04:33 +0300
commitdc5e65b5deb2f5b67f6c3a06ae81c6b074bd4b56 (patch)
tree4776a30dab36243f0239335a12831f7af66da7c4
parent6cdd8f7153b553c6dc02be47e04a2e75117b6fe4 (diff)
downloademacs-dc5e65b5deb2f5b67f6c3a06ae81c6b074bd4b56.tar.gz
emacs-dc5e65b5deb2f5b67f6c3a06ae81c6b074bd4b56.zip
Unset GIT_DIR when calling Git commands
* lisp/vc/vc-git.el (vc-git--call, vc-git-command): Unset GIT_DIR (bug#23769).
-rw-r--r--lisp/vc/vc-git.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index f35c84d50c5..9eac5b26f03 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1423,7 +1423,8 @@ The difference to vc-do-command is that this function always invokes
1423 (let ((coding-system-for-read 1423 (let ((coding-system-for-read
1424 (or coding-system-for-read vc-git-log-output-coding-system)) 1424 (or coding-system-for-read vc-git-log-output-coding-system))
1425 (coding-system-for-write 1425 (coding-system-for-write
1426 (or coding-system-for-write vc-git-commits-coding-system))) 1426 (or coding-system-for-write vc-git-commits-coding-system))
1427 (process-environment (cons "GIT_DIR" process-environment)))
1427 (apply 'vc-do-command (or buffer "*vc*") okstatus vc-git-program 1428 (apply 'vc-do-command (or buffer "*vc*") okstatus vc-git-program
1428 ;; http://debbugs.gnu.org/16897 1429 ;; http://debbugs.gnu.org/16897
1429 (unless (and (not (cdr-safe file-or-list)) 1430 (unless (and (not (cdr-safe file-or-list))
@@ -1451,6 +1452,7 @@ The difference to vc-do-command is that this function always invokes
1451 (coding-system-for-write 1452 (coding-system-for-write
1452 (or coding-system-for-write vc-git-commits-coding-system)) 1453 (or coding-system-for-write vc-git-commits-coding-system))
1453 (process-environment (cons "PAGER=" process-environment))) 1454 (process-environment (cons "PAGER=" process-environment)))
1455 (push "GIT_DIR" process-environment)
1454 (apply 'process-file vc-git-program nil buffer nil command args))) 1456 (apply 'process-file vc-git-program nil buffer nil command args)))
1455 1457
1456(defun vc-git--out-ok (command &rest args) 1458(defun vc-git--out-ok (command &rest args)