Function: majutsu-convert-filename-for-jj
majutsu-convert-filename-for-jj is a natively compiled function
defined in majutsu-jj.el.
Signature
(majutsu-convert-filename-for-jj FILENAME)
Documentation
Convert FILENAME so it can be passed to a jj subprocess.
This follows Magit's magit-convert-filename-for-git direction: absolute
remote file names are converted to host-local paths before being passed in
process-file/start-file-process ARGS. Relative names are left untouched.
Source Code
;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-jj.el
(defun majutsu-convert-filename-for-jj (filename)
"Convert FILENAME so it can be passed to a jj subprocess.
This follows Magit's `magit-convert-filename-for-git' direction: absolute
remote file names are converted to host-local paths before being passed in
`process-file'/`start-file-process' ARGS. Relative names are left untouched."
(if (not (file-name-absolute-p filename))
filename
(let ((expanded (expand-file-name filename)))
(or (file-remote-p expanded 'localname)
expanded))))