Code

git.el: Set process-environment instead of invoking env
authorClifford Caoile <piyo@users.sourceforge.net>
Fri, 18 Apr 2008 13:07:12 +0000 (22:07 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 22 Apr 2008 05:56:16 +0000 (22:56 -0700)
commitdbe48256b41c1e94d81f2458d7e84b1fdcb47026
tree5c7bf3c7e4033fed3eb9a8bc53691c625d5da27f
parent5909ca92d8b2c6a0534597f52f7733ff61a64d63
git.el: Set process-environment instead of invoking env

According to the similar patch from David Kågedal [1], "this will make
it a little less posix-dependent and more efficient." However, there
are two other areas that need to replaced, namely
git-run-command-region and git-run-hooks. This patch implements the
changes of [1] onto those Emacs Lisp functions.

If unpatched, using the git port "msysgit" on Windows will require
defadvice changes as shown at [2] (also explained at 4msysgit.git
[3]).

I have tested git-run-command-region on msysgit, because this is
always called by git-commit (via git-commit-tree <- git-do-commit <-
git-commit-file). However, I could not test git-run-hooks because it
currently does not work on the Emacs Windows port. The latter reports
the hooks files as a+rw and a-x, despite msysgit and cygwin chmod
setting on the respective files.

References:
[1] f27e55864317611385be4d33b3c53ca787379df9
[2] http://groups.google.com/group/msysgit/browse_thread/thread/b852fef689817707
[3] http://repo.or.cz/w/git/mingw/4msysgit.git?a=commit;h=3c30e5e87358eba7b6d7dcd6301ae8438f0c30ea

Signed-off-by: Clifford Caoile <piyo@users.sourceforge.net>
Acked-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/emacs/git.el