Function: treemacs--setup-git-mode

treemacs--setup-git-mode is an interactive and byte-compiled function defined in treemacs-async.el.

Signature

(treemacs--setup-git-mode &optional ARG)

Documentation

Set up treemacs-git-mode(var)/treemacs-git-mode(fun).

Use either ARG as git integration value of read it interactively.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-async.el
(defun treemacs--setup-git-mode (&optional arg)
  "Set up `treemacs-git-mode'.
Use either ARG as git integration value of read it interactively."
  (interactive (list (-> (completing-read "Git Integration: " '("Simple" "Extended" "Deferred"))
                         (downcase)
                         (intern))))
  (setf treemacs--git-mode arg)
  (pcase treemacs--git-mode
    ((or 'extended 'deferred)
     (fset 'treemacs--git-status-process-function #'treemacs--git-status-process-extended)
     (fset 'treemacs--git-status-parse-function   #'treemacs--parse-git-status-extended))
    ('simple
     (fset 'treemacs--git-status-process-function #'treemacs--git-status-process-simple)
     (fset 'treemacs--git-status-parse-function   #'treemacs--parse-git-status-simple))
    (_
     (fset 'treemacs--git-status-process-function #'ignore)
     (fset 'treemacs--git-status-parse-function   (lambda (_) treemacs--empty-table)))))