summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-git.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/init-git.el b/lisp/init-git.el
index 46ef4cf..8ce77c9 100644
--- a/lisp/init-git.el
+++ b/lisp/init-git.el
@@ -57,7 +57,8 @@ CHOOSE-PROJECT is non-nil, prompt for the project name."
(let* ((hash (match-string-no-properties 0))
(project
(and (or choose-project
- (not (projectile-project-p)))
+ (not (projectile-project-p))
+ (not (magit-rev-verify (concat hash "^{commit}"))))
(completing-read "Project: "
(projectile-relevant-known-projects))))
(default-directory (or project default-directory)))