magit not recognizing my git repos

371 views
Skip to first unread message

gdelfino

unread,
Apr 12, 2009, 9:38:47 AM4/12/09
to magit
Hello all. I am new in this list.

I have installed magit 0.7 using ELPA into Carbon Emacs 22.3.1.
Whenever I try to use the magit-status command, I get asked to find
the git repository. I get asked to find this even when I run the magit-
status command while editing a file inside a git repository. After
answering the question with the directory where my .git directory is
located it then says:

"There is no Git repository in "my directory". Create one? (y or n)"

Which I answer "no" because I don't want to damage the existing .git
directory.

I am using git version git version 1.6.1.3

Any ideas on how to make it work?

Regards,

Gustavo Delfino

David Bremner

unread,
Apr 12, 2009, 9:51:33 AM4/12/09
to gdelfino, magit

gdelfino wrote:

>I have installed magit 0.7 using ELPA into Carbon Emacs 22.3.1.
>Whenever I try to use the magit-status command, I get asked to find
>the git repository.

It could be a problem with your shell. There was an implicit
assumption that user's shell was Bourne compatible in magit. Not sure
if that was fixed yet.

I'm running a patched version
(http://www.gitorious.org/projects/magit/repos/bremner-clone/commits/5bdc13c989ec87b8fa3a7be8635aab998646c987)
to work around this. I don't know if this has been fixed in magit
mainline yet.

David

PS if your shell is bash, then this is irrelevant

Gustavo Delfino

unread,
Apr 12, 2009, 10:29:20 AM4/12/09
to magit
David, I am using Bash:

bash-3.2$ bash --version
GNU bash, version 3.2.17(1)-release (i386-apple-darwin9.0)
Copyright (C) 2005 Free Software Foundation, Inc.

and my git executable is here:

bash-3.2$ which git
/usr/local/git/bin/git

Regards,

Gustavo

Gustavo Delfino

unread,
Apr 18, 2009, 11:25:08 AM4/18/09
to magit
I have used the emacs debugger to trace down the problem to the command:

magit-shell-command-to-string("'git' '--no-pager' rev-parse --git-dir
2>/dev/null")

returning an empty string: ""

digging deeper using the debugger I found a call to:

find-file-name-handler("/Users/gdelfino/Sites/mywebapp/" process-file)

which is returning nil and I don't know why as the directory exists.

Any ideas?

Regards,

Gustavo Delfino


On Apr 12, 2009, at 9:08 AM, gdelfino wrote:

>
> Hello all. I am new in this list.
>

> I have installed magit 0.7 using ELPA into Carbon Emacs 22.3.1.
> Whenever I try to use the magit-status command, I get asked to find

Bjørn Arild Mæland

unread,
Apr 27, 2009, 4:29:46 PM4/27/09
to magit
Actually this is probably because start-process can't find your git
executable. Try doing something like this in your Emacs configuration
(adjust the path if needed):

(setenv "PATH" (concat (getenv "PATH") ":/usr/local/git/bin"))
(setq exec-path (append exec-path '("/usr/local/git/bin")))

Best regards,
Bjørn
Reply all
Reply to author
Forward
0 new messages