Function: majutsu-gerrit--selected-remote
majutsu-gerrit--selected-remote is a natively compiled function
defined in majutsu-gerrit.el.
Signature
(majutsu-gerrit--selected-remote &optional ARGS DIRECTORY)
Documentation
Return the currently selected Gerrit remote name.
ARGS defaults to current transient arguments. DIRECTORY controls repo lookup.
Source Code
;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-gerrit.el
(defun majutsu-gerrit--selected-remote (&optional args directory)
"Return the currently selected Gerrit remote name.
ARGS defaults to current transient arguments. DIRECTORY controls repo lookup."
(let* ((default-directory (or directory default-directory))
(args (or args (ignore-errors (transient-get-value))))
(configured (majutsu-gerrit--config-get "gerrit.default-remote"))
(remotes (majutsu-remote-names default-directory)))
(or (transient-arg-value "--remote=" args)
(and configured (member configured remotes) configured)
(and (member "gerrit" remotes) "gerrit")
(and (= (length remotes) 1) (car remotes)))))