Function: majutsu-new--run-command

majutsu-new--run-command is a natively compiled function defined in majutsu-new.el.

Signature

(majutsu-new--run-command ARGS)

Documentation

Execute jj new with ARGS and refresh the log on success.

When called from a blob buffer, also visit the workspace file.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-new.el
(defun majutsu-new--run-command (args)
  "Execute jj new with ARGS and refresh the log on success.
When called from a blob buffer, also visit the workspace file."
  (let ((in-blob (and (bound-and-true-p majutsu-blob-mode)
                      majutsu-buffer-blob-root
                      majutsu-buffer-blob-path))
        (blob-file (when (bound-and-true-p majutsu-blob-mode)
                     (expand-file-name majutsu-buffer-blob-path
                                       majutsu-buffer-blob-root))))
    (let ((exit (apply #'majutsu-call-jj args)))
      (if (zerop exit)
          (progn
            (message "Created new changeset")
            (majutsu-refresh)
            ;; Visit workspace file when in blob buffer
            (when in-blob
              (find-file blob-file))
            t)
        (majutsu-refresh)
        nil))))