This is what I got when I select a directory (whether it had a git repository) and choose "yes" when magit asks if I want to create one:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
magit-mode-get-buffer("*magit: %t*" magit-status-mode)
magit-run-git("init" "/home/user/local/dir/")
call-interactively(magit-status record nil)
command-execute(magit-status record)
execute-extended-command(nil "magit-status")
call-interactively(execute-extended-command nil nil)

I'm using:

Verified with a bare init.el.

  • There's something hazy with your description: why would magit ask to create a new repository in a directory with an existing repository? - That shouldn't happen. From the stack trace it looks like magit failed to create status buffer / failed to find what directory is being worked with, but maybe that's because git init has failed (on an existing repository)? Could it be a permission issue? Maybe your user can't access this directory?
    – wvxvw
    Mar 11 '15 at 9:55
  • I could not reproduce this, when there is a repository then magit shows its status, when there is none and I answer that it should create one, then it does so and then shows its status. By guess is that your version of git is to old or that there are symlinks involved.
    – tarsius
    Mar 11 '15 at 9:59
  • @tarsius, I'm using git 1.7.1, and I don't have superuser access. Are any easy workarounds possible (like getting an old version of magit) or am I forced to compile git from source? What is the earliest compatible git release?
    – dmvianna
    Mar 12 '15 at 1:52
  • You'll have to compile it from source then. If I remember correctly make install by default installs in you home directory. For the master branch you need 1.8.2 and for the next 1.9.1. But you might just as well install the latest version.
    – tarsius
    Mar 12 '15 at 21:38
  • @tarsius you were right. magit works fine with latest stable git (2.3.x).
    – dmvianna
    Mar 12 '15 at 22:28

@tarsius was right. magit works fine with latest stable git (2.3.x).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.