Function: majutsu-git-root

majutsu-git-root is an interactive and natively compiled function defined in majutsu-git.el.

Signature

(majutsu-git-root)

Documentation

Show the underlying Git directory of the current repository.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-git.el
(defun majutsu-git-root ()
  "Show the underlying Git directory of the current repository."
  (interactive)
  (let* ((raw (string-trim (or (car (majutsu-jj-lines "git" "root")) "")))
         (dir (unless (string-empty-p raw)
                (majutsu-jj-expand-filename-from-jj raw default-directory))))
    (if (or (null dir) (string-empty-p dir))
        (message "No underlying Git directory found")
      (kill-new dir)
      (message "Git root: %s (copied)" dir))))