Function: magit-remote--cleanup-push-variables
magit-remote--cleanup-push-variables is a byte-compiled function
defined in magit-remote.el.
Signature
(magit-remote--cleanup-push-variables REMOTE &optional NEW-NAME)
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-remote.el
(defun magit-remote--cleanup-push-variables (remote &optional new-name)
(magit-with-toplevel
(when (equal (magit-get "remote.pushDefault") remote)
(magit-set new-name "remote.pushDefault"))
(dolist (var (magit-git-lines "config" "--name-only"
"--get-regexp" "^branch\\.[^.]*\\.pushRemote"
(format "^%s$" remote)))
(magit-call-git "config" (and (not new-name) "--unset") var new-name))))