workdir: Workdir of repository

Description Usage Arguments Value Examples

View source: R/repository.R

Description

Workdir of repository

Usage

1
workdir(repo = ".")

Arguments

repo

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

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)

Example output

[1] "/work/tmp/tmp/RtmpztqpuG/git2r-4da0471d7948"

git2r documentation built on Nov. 22, 2021, 9:08 a.m.

Related to workdir in git2r...