diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-08-11 01:19:56 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-08-11 01:19:56 -0400 |
commit | 2f055c83f2178bd9a746db05bd9a099a37ab8dcf (patch) | |
tree | 19dc9a62839e24494ded78dc4959b881f31ef96e /lisp | |
parent | 9a825577040ff0f5b469eeff36eea3d031639193 (diff) | |
download | emacs.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.el | 3 |
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))) |