Function: majutsu-workspace--sibling-root
majutsu-workspace--sibling-root is a natively compiled function
defined in majutsu-workspace.el.
Signature
(majutsu-workspace--sibling-root NAME ROOT)
Documentation
Return a sibling directory of ROOT named NAME if it is a matching workspace.
Checks whether a directory named NAME exists alongside ROOT and is itself a jj workspace whose current workspace name equals NAME. Returns the directory path or nil.
Source Code
;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-workspace.el
(defun majutsu-workspace--sibling-root (name root)
"Return a sibling directory of ROOT named NAME if it is a matching workspace.
Checks whether a directory named NAME exists alongside ROOT and
is itself a jj workspace whose current workspace name equals NAME.
Returns the directory path or nil."
(let* ((parent (file-name-directory (directory-file-name root)))
(candidate (file-name-as-directory (expand-file-name name parent))))
(when (and (file-directory-p candidate)
(majutsu-toplevel candidate)
(equal (majutsu-workspace-current-name candidate) name))
candidate)))