Function: treemacs--parse-git-status-extended
treemacs--parse-git-status-extended is a byte-compiled function
defined in treemacs-async.el.
Signature
(treemacs--parse-git-status-extended GIT-FUTURE)
Documentation
Parse the git status derived from the output of GIT-FUTURE.
The real parsing and formatting is done by the python process. All that's really left to do is pick up the cons list and put it in a hash table.
GIT-FUTURE: Pfuture
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-async.el
(defun treemacs--parse-git-status-extended (git-future)
"Parse the git status derived from the output of GIT-FUTURE.
The real parsing and formatting is done by the python process. All that's
really left to do is pick up the cons list and put it in a hash table.
GIT-FUTURE: Pfuture"
(or (when git-future
(let* ((git-output (pfuture-await-to-finish git-future))
(git-stderr (pfuture-stderr git-future)))
;; Check stderr separately from parsing, often git status displays
;; warnings which do not affect the final result.
(unless (s-blank? git-stderr)
(let ((visible-error (--> (s-trim git-stderr)
(s-replace "\n" ", " it)
(s-truncate 80 it)
(propertize it 'face 'error))))
(if (< (length git-stderr) 80)
(treemacs-log-err "treemacs-git-status.py wrote to stderr: %s" visible-error)
(treemacs-log-err "treemacs-git-status.py wrote to stderr (see full output in *Messages*): %s" visible-error)
(let ((inhibit-message t))
(treemacs-log "treemacs-git-status.py wrote to stderr: %s" git-stderr)))))
(when (= 0 (process-exit-status git-future))
(-let [parsed-output (read git-output)]
(if (hash-table-p parsed-output)
parsed-output
(let ((inhibit-message t))
(treemacs-log-err "treemacs-git-status.py output: %s" git-output))
(treemacs-log-err "treemacs-git-status.py did not output a valid hash table. See full output in *Messages*.")
nil)))))
treemacs--empty-table))