Function: vc-git-trunk-or-topic-p

vc-git-trunk-or-topic-p is a byte-compiled function defined in vc-git.el.gz.

Signature

(vc-git-trunk-or-topic-p &optional BRANCH)

Documentation

Return topic if branch has distinct pull and push remotes, else nil.

This is able to identify topic branches for certain forge workflows.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc-git.el.gz
(defun vc-git-trunk-or-topic-p (&optional branch)
  "Return `topic' if branch has distinct pull and push remotes, else nil.
This is able to identify topic branches for certain forge workflows."
  (let ((remotes (vc-git--branch-remotes branch)))
    (and (assq 'upstream remotes) (assq 'push remotes) 'topic)))