Skip to content

Commit

Permalink
magit-popup-set-variable: use magit-set
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed Jun 6, 2016
1 parent 780ce42 commit f330168
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lisp/magit-popup.el
Expand Up @@ -830,11 +830,10 @@ TYPE is one of `:action', `:sequence-action', `:switch', or

(defun magit-popup-set-variable
(variable choices &optional default other)
(--if-let (--if-let (magit-git-string "config" "--local" variable)
(cadr (member it choices))
(car choices))
(magit-set it variable)
(magit-call-git "config" "--unset" variable))
(magit-set (--if-let (magit-git-string "config" "--local" variable)
(cadr (member it choices))
(car choices))
variable)
(magit-refresh)
(message "%s %s" variable
(magit-popup-format-variable-1 variable choices default other)))
Expand Down

0 comments on commit f330168

Please sign in to comment.