Search code examples
windowsgitemacscygwindifftool

`git difftool` refuses to run under Emacs inferior shell


When I type git difftool under plain cygwin shell, I just receive benign exit:

~/sb/ws> git difftool
~/sb/ws>

But when I type exactly the same thing under Emacs inferior shell (running the same cygwin bash), I receive the following error:

~/sb/ws> git difftool
git difftool
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LC_ALL = (unset),
    LANG = "ENU"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
~/sb/ws> 

Any idea why this is happening and how to fix this?

(all other git commands, by the way, work perfectly under this Emacs inferior shell, so I can only assume this must be something specific to difftool)

EDIT (providing variant & version information on the tools involved):

  1. cygwin-1.7.8-1
  2. GNU Emacs 23.2.1 (i386-mingw-nt6.1.7600) of 2010-05-08 on G41R2F1
  3. git version 1.7.4
  4. Windows 7 Ultimate 64-bit

Solution

  • you're really have wrong LANG, look onto /usr/share/locale for list of available locales..

    But really question is - why're using git directly in Emacs, when it has several good git modes, and magit - the best between them? Why not perform all tasks using Emacs?

    P.S. I have an article about Emacs + Git...