magit/magit — pull request #883 by monsanto (2013-09-17 01:19:19+00:00)
Title: magit-get-top-dir: fix if in .git directory

If we are in repo/.git, magit-get-top-dir will return nil. Fix this by
explicitly checking for .git in the working directory and returning the
preceeding path if so.

Among other things, this fixes a bug in git-rebase-mode, where you can't
view commits because default-directory is set to repo/.git/rebase-merge/.