aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my/my-magit.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/lisp/my/my-magit.el')
-rw-r--r--emacs/.emacs.d/lisp/my/my-magit.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-magit.el b/emacs/.emacs.d/lisp/my/my-magit.el
index c6fc0f6..efb3c84 100644
--- a/emacs/.emacs.d/lisp/my/my-magit.el
+++ b/emacs/.emacs.d/lisp/my/my-magit.el
@@ -67,5 +67,13 @@
(replace-regexp-in-string "/build\\>.*" "/src"
default-directory))))
+(defun my-magit-ignore-other-worktrees (rev-and-args)
+ "Add --ignore-other-worktrees to the second element of REV-AND-ARGS.
+
+For use as a :filter-args advice"
+ (pcase-let ((`(,revision ,args) rev-and-args))
+ (list revision
+ (cons "--ignore-other-worktrees" args))))
+
(provide 'my-magit)
;;; my-magit.el ends here