summaryrefslogtreecommitdiff
path: root/lisp/vc
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/vc')
-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 783ea89c6ce..e6fe0196d88 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1434,7 +1434,8 @@ The difference to vc-do-command is that this function always invokes
(let ((coding-system-for-read
(or coding-system-for-read vc-git-log-output-coding-system))
(coding-system-for-write
- (or coding-system-for-write vc-git-commits-coding-system)))
+ (or coding-system-for-write vc-git-commits-coding-system))
+ (process-environment (cons "GIT_DIR" process-environment)))
(apply 'vc-do-command (or buffer "*vc*") okstatus vc-git-program
;; http://debbugs.gnu.org/16897
(unless (and (not (cdr-safe file-or-list))
@@ -1462,6 +1463,7 @@ The difference to vc-do-command is that this function always invokes
(coding-system-for-write
(or coding-system-for-write vc-git-commits-coding-system))
(process-environment (cons "PAGER=" process-environment)))
+ (push "GIT_DIR" process-environment)
(apply 'process-file vc-git-program nil buffer nil command args)))
(defun vc-git--out-ok (command &rest args)