Learn R Programming

git2r (version 0.35.0)

is_bare: Check if repository is bare

Description

Check if repository is bare

Usage

is_bare(repo = ".")

Value

TRUE if bare repository, else FALSE

Arguments

repo

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

See Also

init

Examples

Run this code
if (FALSE) {
## 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)
}

Run the code above in your browser using DataLab