diff options
| author | Dmitry Gutov | 2016-06-22 02:04:33 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2016-06-22 02:04:33 +0300 |
| commit | dc5e65b5deb2f5b67f6c3a06ae81c6b074bd4b56 (patch) | |
| tree | 4776a30dab36243f0239335a12831f7af66da7c4 | |
| parent | 6cdd8f7153b553c6dc02be47e04a2e75117b6fe4 (diff) | |
| download | emacs-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.el | 4 |
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) |