summaryrefslogtreecommitdiff
path: root/contrib/emacs
diff options
context:
space:
mode:
authorLibravatar David Kågedal <davidk@lysator.liu.se>2008-02-19 15:01:53 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-02-20 11:25:14 -0800
commitf27e55864317611385be4d33b3c53ca787379df9 (patch)
tree5cdb673c3e4b7fc87395298837ec0cf031a6bd3b /contrib/emacs
parentMerge branch 'maint' (diff)
downloadtgif-f27e55864317611385be4d33b3c53ca787379df9.tar.xz
git.el: Set process-environment instead of invoking env
This will make it a little less posix-dependent, and more efficient. Included is also a minor doc improvement. Signed-off-by: David Kågedal <davidk@lysator.liu.se> Acked-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/emacs')
-rw-r--r--contrib/emacs/git.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index a8bf0ef883..f69b697f8d 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -185,9 +185,8 @@ if there is already one that displays the same directory."
(defun git-call-process-env (buffer env &rest args)
"Wrapper for call-process that sets environment strings."
- (if env
- (apply #'call-process "env" nil buffer nil
- (append (git-get-env-strings env) (list "git") args))
+ (let ((process-environment (append (git-get-env-strings env)
+ process-environment)))
(apply #'call-process "git" nil buffer nil args)))
(defun git-call-process-display-error (&rest args)
@@ -204,7 +203,7 @@ if there is already one that displays the same directory."
(defun git-call-process-env-string (env &rest args)
"Wrapper for call-process that sets environment strings,
-and returns the process output as a string."
+and returns the process output as a string, or nil if the git failed."
(with-temp-buffer
(and (eq 0 (apply #' git-call-process-env t env args))
(buffer-string))))