is_bare {git2r}R Documentation

Check if repository is bare

Description

Check if repository is bare

Usage

is_bare(repo)

## S4 method for signature 'git_repository'
is_bare(repo)

## S4 method for signature 'missing'
is_bare()

Arguments

repo

The repository object git_repository to check if it's bare. If the repo argument is missing, the repository is searched for with discover_repository in the current working directory.

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)

[Package git2r version 0.18.0 Index]