From e4985555a4d5e381e626e0e79cc6115a7dbc7ca9 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 17 Oct 2014 01:02:37 -0400 Subject: Add command magit-show-project-commit-under-point --- lisp/init-git.el | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lisp') diff --git a/lisp/init-git.el b/lisp/init-git.el index b2c03e4..d78655d 100644 --- a/lisp/init-git.el +++ b/lisp/init-git.el @@ -32,6 +32,14 @@ This is useful for commit IDs in files and log messages." (--when-let (thing-at-point 'word) (magit-show-commit it))) +(defun km/magit-show-project-commit-under-point () + "Select a project and run `km/magit-show-project-commit-under-point'." + (interactive) + (--when-let (thing-at-point 'word) + (let ((projectile-switch-project-action + '(lambda () (magit-show-commit it)))) + (projectile-switch-project)))) + (defun km/magit-push-all () "Push all branches." (interactive) @@ -141,6 +149,7 @@ START-POINT set to the current branch. (define-prefix-command 'km/git-map) (global-set-key (kbd "C-c g") 'km/git-map) (define-key km/git-map "c" 'km/magit-show-commit-under-point) +(define-key km/git-map "C" 'km/magit-show-project-commit-under-point) (define-key km/git-map "u" 'km/magit-auto-commit) -- cgit v1.2.3