magit-menu-make-option-list rewritten
The previous implementation generated a single list element for arguments of the type --arg value. That should be separate list elements, otherwise the process sees it as a single argument with an embedded space.
This commit is contained in:
parent
b2c0fcb7b8
commit
bf7bc1a0c5
1 changed files with 11 additions and 12 deletions
23
magit.el
23
magit.el
|
@ -1513,19 +1513,18 @@ FUNC should leave point at the end of the modified region"
|
|||
(call-interactively chosen-fn))))))
|
||||
|
||||
(defun magit-menu-make-option-list (menu-items)
|
||||
(let ((result '())
|
||||
(option))
|
||||
(let ((result '()))
|
||||
(dolist (item menu-items)
|
||||
(when (and (stringp (nth 3 item)) (nth 5 item))
|
||||
(setq option
|
||||
(concat (nth 3 item)
|
||||
(if (stringp (nth 5 item))
|
||||
(if (string= "="
|
||||
(substring (nth 3 item)
|
||||
(- (length (nth 3 item)) 1)))
|
||||
(shell-quote-argument (nth 5 item))
|
||||
(concat " " (shell-quote-argument (nth 5 item)))))))
|
||||
(setq result (append result (list option)))))
|
||||
(let ((option (nth 3 item))
|
||||
(value (nth 5 item)))
|
||||
(when (and (stringp option) value)
|
||||
(when (and (stringp value)
|
||||
(string= "=" (substring option (- (length option) 1))))
|
||||
(setq option (concat option value))
|
||||
(setq value nil))
|
||||
(setq result (append result (list (shell-quote-argument option))))
|
||||
(when (stringp value)
|
||||
(setq result (append result (list (shell-quote-argument value))))))))
|
||||
result))
|
||||
|
||||
;;; Mode
|
||||
|
|
Loading…
Reference in a new issue