summaryrefslogtreecommitdiff
path: root/contrib/emacs
diff options
context:
space:
mode:
authorLibravatar Karl Hasselström <kha@treskal.com>2008-06-03 00:41:44 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-06-02 19:07:12 -0700
commit3db4723ead0f141540118f622dedac5106b07a8e (patch)
tree2951d5019b751435ee14f2f791f47570e954102a /contrib/emacs
parentMerge branch 'sb/am-tests' (diff)
downloadtgif-3db4723ead0f141540118f622dedac5106b07a8e.tar.xz
Revert "git.el: Set process-environment instead of invoking env"
This reverts commit dbe48256b41c1e94d81f2458d7e84b1fdcb47026, which caused mis-encoding of non-ASCII author/committer names when the git-status mode is used to create commits. Signed-off-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/emacs')
-rw-r--r--contrib/emacs/git.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index 2557a7667f..4fa853fae7 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -232,8 +232,10 @@ and returns the process output as a string, or nil if the git failed."
(defun git-run-command-region (buffer start end env &rest args)
"Run a git command with specified buffer region as input."
- (unless (eq 0 (let ((process-environment (append (git-get-env-strings env)
- process-environment)))
+ (unless (eq 0 (if env
+ (git-run-process-region
+ buffer start end "env"
+ (append (git-get-env-strings env) (list "git") args))
(git-run-process-region
buffer start end "git" args)))
(error "Failed to run \"git %s\":\n%s" (mapconcat (lambda (x) x) args " ") (buffer-string))))
@@ -248,8 +250,9 @@ and returns the process output as a string, or nil if the git failed."
(erase-buffer)
(cd dir)
(setq status
- (let ((process-environment (append (git-get-env-strings env)
- process-environment)))
+ (if env
+ (apply #'call-process "env" nil (list buffer t) nil
+ (append (git-get-env-strings env) (list hook-name) args))
(apply #'call-process hook-name nil (list buffer t) nil args))))
(display-message-or-buffer buffer)
(eq 0 status)))))