diff options
-rw-r--r-- | lisp/km-magit.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/km-magit.el b/lisp/km-magit.el index a04a15a..062944d 100644 --- a/lisp/km-magit.el +++ b/lisp/km-magit.el @@ -726,6 +726,17 @@ category." (magit-define-section-jumper magit-jump-to-remote-counts "Remote counts" remote-counts) +(defun km/magit-add-pull-refspec-to-origin () + "Configure repository to pull refs/pull/*/head from 'origin'." + (interactive) + (let* ((keys (list "remote" "origin" "fetch")) + (existing (apply #'magit-get-all keys)) + (rs "+refs/pull/*/head:refs/pull/origin/*")) + (unless (member rs existing) + (apply #'magit-set-all + (append existing (list rs)) + keys)))) + ;;; Copy functions |