From c92952fdcd94590b0a603dd358908cb7d276c991 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 11 Aug 2018 23:38:46 -0400 Subject: magit: Add custom magit-log-current variant --- lisp/km-magit.el | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lisp') diff --git a/lisp/km-magit.el b/lisp/km-magit.el index 19cae74..83b6b08 100644 --- a/lisp/km-magit.el +++ b/lisp/km-magit.el @@ -627,6 +627,12 @@ argument. Interactively, this can be accessed using the command 'git-commit-flyspell-verify) (turn-on-flyspell)) +(defun km/magit-log-current (&optional args files) + "Like `magit-log-current', but if head is detached, use \"HEAD\"." + (interactive (magit-log-arguments)) + (magit-log (list (or (magit-get-current-branch) "HEAD")) + args files)) + (defun km/magit-log-dwim (&optional args files) (interactive (magit-log-arguments)) (let ((range -- cgit v1.2.3