Workdir of repository

Description

Workdir of repository

Usage

1
2
3
4
5
6
7
workdir(repo)

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

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

Arguments

repo

The repository object git_repository. If the repo argument is missing, the repository is searched for with discover_repository in the current working directory.

Value

Character vector with the path of the workdir. If the repository is bare, NULL will be returned.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
## Create a directory in tempdir
path <- tempfile(pattern="git2r-")
dir.create(path)

## Initialize a repository
repo <- init(path)

## Get the path of the workdir for repository
workdir(repo)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.