tests/testthat/helper-utils.R

git <- function(...) cliff::run("git", ...)

local_temp_git_repo <- function() {
    repo <- tempfile("repo")
    dir.create(repo, showWarnings = FALSE)
    withr::defer_parent(unlink(repo))
    git("init", wd = repo)
    return(repo)
}
randy3k/cliff documentation built on Dec. 22, 2021, 12:55 p.m.