Commit e426992c authored by Jonas Bernoulli's avatar Jonas Bernoulli

Revert "Silence byte-compiler"

This reverts commit 64be29ba.
parent dc857e2e
......@@ -1823,16 +1823,15 @@ the reference is used. The first regexp submatch becomes the
(gv-define-setter magit-get (val &rest keys)
`(magit-set ,val ,@keys))
(defun magit-set-all (values* &rest keys)
"Set all values of the Git variable specified by KEYS to VALUES.
\n(fn VALUES &rest KEYS)"
(defun magit-set-all (values &rest keys)
"Set all values of the Git variable specified by KEYS to VALUES."
(let ((arg (and (or (null (car keys))
(string-prefix-p "--" (car keys)))
(pop keys)))
(var (mapconcat 'identity keys ".")))
(when (magit-get var)
(magit-call-git "config" arg "--unset-all" var))
(dolist (v values*)
(dolist (v values)
(magit-call-git "config" arg "--add" var v))))
;;;; Variables in Popups
......
......@@ -260,11 +260,10 @@ Delete the symbolic-ref \"refs/remotes/<remote>/HEAD\"."
(interactive (magit-remote-config--read-args "url" "Urls: "))
(magit-remote-config--set-url remote "url" urls))
(defun magit-set-remote*fetch (remote values*)
"Set the variable `fetch' for the remote named REMOTE to VALUES.
\n(fn REMOTE VALUES)"
(defun magit-set-remote*fetch (remote values)
"Set the variable `fetch' for the remote named REMOTE to VALUES."
(interactive (magit-remote-config--read-args "fetch" "Fetch specs: "))
(magit-set-all values* "remote" remote "fetch")
(magit-set-all values "remote" remote "fetch")
(magit-refresh))
(defun magit-set-remote*pushurl (remote urls)
......@@ -272,11 +271,10 @@ Delete the symbolic-ref \"refs/remotes/<remote>/HEAD\"."
(interactive (magit-remote-config--read-args "pushurl" "Urls: "))
(magit-remote-config--set-url remote "pushurl" urls "--push"))
(defun magit-set-remote*push (remote values*)
"Set the variable `push' for the remote named REMOTE to VALUES.
\n(fn REMOTE VALUES)"
(defun magit-set-remote*push (remote values)
"Set the variable `push' for the remote named REMOTE to VALUES."
(interactive (magit-remote-config--read-args "push" "Push specs: "))
(magit-set-all values* "remote" remote "push")
(magit-set-all values "remote" remote "push")
(magit-refresh))
(defun magit-cycle-remote*tagOpt (remote)
......@@ -315,11 +313,11 @@ Delete the symbolic-ref \"refs/remotes/<remote>/HEAD\"."
prompt nil nil nil
(and value (mapconcat #'identity value ",")))))))
(defun magit-remote-config--set-url (remote var values* &optional arg)
(defun magit-remote-config--set-url (remote var values &optional arg)
(let ((old (magit-get-all "remote" remote var)))
(dolist (v (-difference values* old))
(dolist (v (-difference values old))
(magit-call-git "remote" "set-url" arg "--add" remote v))
(dolist (v (-difference old values*))
(dolist (v (-difference old values))
(magit-call-git "remote" "set-url" arg "--delete" remote
(concat "^" (regexp-quote v) "$"))))
(magit-refresh))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment