Function: magit-bare-repo-p

magit-bare-repo-p is a byte-compiled function defined in magit-git.el.

Signature

(magit-bare-repo-p &optional NOERROR)

Documentation

Return t if the current repository is bare.

If it is non-bare, then return nil. If default-directory isn't below a Git repository, then signal an error unless NOERROR is non-nil, in which case return nil.

Implementations

(magit-bare-repo-p &optional NOERROR) in `magit-git.el'.

Undocumented

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-git.el
(cl-defgeneric magit-bare-repo-p (&optional noerror)
  "Return t if the current repository is bare.
If it is non-bare, then return nil.  If `default-directory'
isn't below a Git repository, then signal an error unless
NOERROR is non-nil, in which case return nil."
  (and (magit--assert-default-directory noerror)
       (condition-case nil
           (magit-rev-parse-true "--is-bare-repository")
         (magit-invalid-git-boolean
          (and (not noerror)
               (signal 'magit-outside-git-repo default-directory))))))