update of packages
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
;;; magit-transient.el --- Support for transients -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2008-2022 The Magit Project Contributors
|
||||
;; Copyright (C) 2008-2023 The Magit Project Contributors
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
@@ -37,12 +37,12 @@
|
||||
|
||||
(defclass magit--git-variable (transient-variable)
|
||||
((scope :initarg :scope)
|
||||
(global :initarg :global :initform nil)))
|
||||
(global :initarg :global :initform nil)
|
||||
(default :initarg :default :initform nil)))
|
||||
|
||||
(defclass magit--git-variable:choices (magit--git-variable)
|
||||
((choices :initarg :choices)
|
||||
(fallback :initarg :fallback :initform nil)
|
||||
(default :initarg :default :initform nil)))
|
||||
(fallback :initarg :fallback :initform nil)))
|
||||
|
||||
(defclass magit--git-variable:boolean (magit--git-variable:choices)
|
||||
((choices :initarg :choices :initform '("true" "false"))))
|
||||
@@ -134,9 +134,9 @@
|
||||
(seturl (oref obj seturl-arg))
|
||||
(remote (oref transient--prefix scope)))
|
||||
(oset obj value values)
|
||||
(dolist (v (-difference values previous))
|
||||
(dolist (v (cl-set-difference values previous :test #'equal))
|
||||
(magit-call-git "remote" "set-url" seturl "--add" remote v))
|
||||
(dolist (v (-difference previous values))
|
||||
(dolist (v (cl-set-difference previous values :test #'equal))
|
||||
(magit-call-git "remote" "set-url" seturl "--delete" remote
|
||||
(concat "^" (regexp-quote v) "$")))
|
||||
(magit-refresh)))
|
||||
@@ -158,7 +158,11 @@
|
||||
(propertize (car value) 'face 'transient-value))
|
||||
(propertize (car (split-string value "\n"))
|
||||
'face 'transient-value))
|
||||
(propertize "unset" 'face 'transient-inactive-value)))
|
||||
(if-let* ((default (oref obj default))
|
||||
(default (if (functionp default) (funcall default) default)))
|
||||
(concat (propertize "default:" 'face 'transient-inactive-value)
|
||||
(propertize default 'face 'transient-value))
|
||||
(propertize "unset" 'face 'transient-inactive-value))))
|
||||
|
||||
(cl-defmethod transient-format-value ((obj magit--git-variable:choices))
|
||||
(let* ((variable (oref obj variable))
|
||||
@@ -215,6 +219,15 @@
|
||||
'transient-value))))))
|
||||
(propertize "]" 'face 'transient-inactive-value))))
|
||||
|
||||
;;; Utilities
|
||||
|
||||
(defun magit--transient-args-and-files ()
|
||||
"Return (args files) for use by log and diff functions.
|
||||
The value derives from that returned by `transient-get-value'."
|
||||
(let ((args (transient-get-value)))
|
||||
(list (seq-filter #'atom args)
|
||||
(cdr (assoc "--" args)))))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-transient)
|
||||
;;; magit-transient.el ends here
|
||||
|
||||
Reference in New Issue
Block a user