If a repository is created using `git init --separate-git-dir', then
that does not set `core.worktree' (unlike what `git submodule' does).
When committing inside such a repository `magit-commit-diff' is run
inside the gitdir, and there is no way to prevent that. Luckily `git
diff' also works inside the gitdir, but because many other commands
don't, we always run everything in the working tree.
This is fairly deeply ingrained, so we have to add a kludge to
`magit-toplevel', that causes it to return the gitdir instead,
and that is triggered by dynamically binding the new variable
`magit-toplevel--force-fallback-to-gitdir' to a non-nil value.
And `magit-commit-diff' now does so to fix #2955.