diff options
Diffstat (limited to '')
-rw-r--r-- | users/tazjin/emacs/config/functions.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/users/tazjin/emacs/config/functions.el b/users/tazjin/emacs/config/functions.el index df5b1c1239f0..d4d0c0d603e0 100644 --- a/users/tazjin/emacs/config/functions.el +++ b/users/tazjin/emacs/config/functions.el @@ -289,4 +289,11 @@ (add-to-list 'project-find-functions #'find-depot-project) +(defun magit-find-file-worktree () + (interactive) + "Find a file in the current (ma)git worktree." + (magit-find-file--internal "{worktree}" + (magit-read-file-from-rev "HEAD" "Find file") + #'pop-to-buffer-same-window)) + (provide 'functions) |