Created
November 5, 2018 15:11
-
-
Save jdelStrother/736670ddcfe8f44af02e5dea884943b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun magit-log-trace-definition-hacks (orig-func &rest args) | |
(if (called-interactively-p 'any) | |
(let ((file (or (magit-file-relative-name) (user-error "Buffer isn't visiting a file"))) | |
(fn (replace-regexp-in-string "^.*[#.:]+" "" (which-function))) | |
(ref (or magit-buffer-refname (magit-get-current-branch) "HEAD"))) | |
(message "%s" fn) | |
(apply orig-func (list file fn ref))) | |
(apply orig-func args) | |
)) | |
(advice-add 'magit-log-trace-definition :around #'magit-log-trace-definition-hacks) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment