summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-08-11 01:19:56 -0400
committerKyle Meyer <kyle@kyleam.com>2015-08-11 01:19:56 -0400
commit2f055c83f2178bd9a746db05bd9a099a37ab8dcf (patch)
tree19dc9a62839e24494ded78dc4959b881f31ef96e /lisp
parent9a825577040ff0f5b469eeff36eea3d031639193 (diff)
downloademacs.d-2f055c83f2178bd9a746db05bd9a099a37ab8dcf.tar.gz
magit-show-commit-at-point: add hash check
Prompt unless hash is in the current project.
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)))