magit/magit — pull request #1540 by kyleam (2014-10-09 03:28:09+00:00)
Title: Check if inside repo before trying to save buffers

`magit-init` would fail when there were any modified buffers because
`magit-pre-call-git-hook` calls `magit-maybe-save-repository-buffers`,
which, when not in a repo, results in nil being passed as an argument to
`string-prefix-p`.