summaryrefslogtreecommitdiff
path: root/contrib/emacs
diff options
context:
space:
mode:
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>2012-11-22 15:58:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-11-26 17:34:28 (GMT)
commitf7d8e3d01f46ecfa5b4bc8c13640831d97a78236 (patch)
tree6f69ff022da38e3c27ebc719bf2a259a03f51637 /contrib/emacs
parente8a1f5a2ae53805986b1b965e036450bdfc0c460 (diff)
downloadgit-f7d8e3d01f46ecfa5b4bc8c13640831d97a78236.zip
git-f7d8e3d01f46ecfa5b4bc8c13640831d97a78236.tar.gz
git-f7d8e3d01f46ecfa5b4bc8c13640831d97a78236.tar.bz2
emacs: make 'git-status' work with separate git dirs
when trying 'M-x git-status' in a submodule created with recent (1.7.5+) git, the command fails with | ... is not a git working tree This is caused by creating submodules with '--separate-git-dir' but still checking for a working tree by testing for a '.git' directory. The patch fixes this by relaxing the existing detection a little bit. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Acked-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/emacs')
-rw-r--r--contrib/emacs/git.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index 65c95d9..5ffc506 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -1671,7 +1671,7 @@ Commands:
"Entry point into git-status mode."
(interactive "DSelect directory: ")
(setq dir (git-get-top-dir dir))
- (if (file-directory-p (concat (file-name-as-directory dir) ".git"))
+ (if (file-exists-p (concat (file-name-as-directory dir) ".git"))
(let ((buffer (or (and git-reuse-status-buffer (git-find-status-buffer dir))
(create-file-buffer (expand-file-name "*git-status*" dir)))))
(switch-to-buffer buffer)