magit/git-modes — pull request #45 by praet (2013-08-30 05:02:25+00:00)
Title: `git-rebase-show-commit': run `magit-show-commit' in correct `default-directory'

To find out the correct `default-directory' in which to initialize
`magit-commit-mode', `magit-show-commit' uses `magit-get-top-dir',
which uses "git rev-parse --show-cdup".

Unfortunately, that command doesn't return anything when run from
within (a subdir of) $GIT_DIR like e.g. "/.git/rebase-merge/",
causing subsequent commands in `magit-refresh-commit-buffer' to fail.

Fix it by setting `default-directory' to the current dir's grandparent
before invoking `magit-show-commit'.

Fixes #44.

Signed-off-by: Pieter Praet