is_bare: Check if repository is bare

View source: R/repository.R

is_bareR Documentation

Check if repository is bare

Description

Check if repository is bare

Usage

is_bare(repo = ".")

Arguments

repo

a path to a repository or a git_repository object. Default is '.'

Value

TRUE if bare repository, else FALSE

See Also

init

Examples

## Not run: 
## Initialize a repository
path <- tempfile(pattern="git2r-")
dir.create(path)
repo <- init(path)
is_bare(repo)

## Initialize a bare repository
path_bare <- tempfile(pattern="git2r-")
dir.create(path_bare)
repo_bare <- init(path_bare, bare = TRUE)
is_bare(repo_bare)

## End(Not run)

git2r documentation built on March 18, 2022, 5:12 p.m.

Related to is_bare in git2r...