git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Karl Hasselström" <kha@treskal.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org,
	"Clifford Caoile" <piyo@users.sourceforge.net>,
	"David Kågedal" <davidk@lysator.liu.se>
Subject: [PATCH] Revert "git.el: Set process-environment instead of invoking env"
Date: Tue, 03 Jun 2008 00:41:44 +0200	[thread overview]
Message-ID: <20080602223907.9612.84564.stgit@yoghurt> (raw)
In-Reply-To: <7vod6nk05c.fsf@gitster.siamese.dyndns.org>

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>

---

On 2008-05-30 13:27:43 -0700, Junio C Hamano wrote:

> Karl Hasselström <kha@treskal.com> writes:
> 
> > How are things going with this fix? Junio, I expect you're waiting
> > for a properly cleaned-up patch, possibly with acks from relevant
> > people?
> 
> You expected correctly.

In case no one who understands how, why, and whether the fix works
comes forward, here's a revert of the commit that introduced the
problem.

 contrib/emacs/git.el |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)


diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index 2557a76..4fa853f 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)))))

  reply	other threads:[~2008-06-02 22:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-20 22:09 encoding bug in git.el Karl Hasselström
     [not found] ` <87mymkbo9x.fsf@lysator.liu.se>
2008-05-21 14:08   ` Clifford Caoile
2008-05-21 14:54     ` Karl Hasselström
2008-05-21 21:31       ` Clifford Caoile
2008-05-23  7:09         ` Karl Hasselström
2008-05-25 13:42     ` Karl Hasselström
2008-05-30 12:28       ` Karl Hasselström
2008-05-30 20:27         ` Junio C Hamano
2008-06-02 22:41           ` Karl Hasselström [this message]
2008-06-03 15:54             ` [PATCH] Revert "git.el: Set process-environment instead of invoking env" David Christensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080602223907.9612.84564.stgit@yoghurt \
    --to=kha@treskal.com \
    --cc=davidk@lysator.liu.se \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=piyo@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).