@@ 1,3 1,10 @@
+2022-09-22 Enrico Schumann <es@enricoschumann.net>
+
+ * DESCRIPTION (Version): 0.3.2
+
+ * R/repos.R (git_bundle_pull, git_bundle_clone):
+ allow arguments to be passed to system2
+
2022-09-06 Enrico Schumann <es@enricoschumann.net>
* DESCRIPTION (Version): 0.3.1
@@ 1,8 1,8 @@
Package: esutils
Type: Package
Title: esutils
-Version: 0.3.1
-Date: 2022-09-06
+Version: 0.3.2
+Date: 2022-09-22
Maintainer: Enrico Schumann <es@enricoschumann.net>
Authors@R: person(given = "Enrico", family = "Schumann",
role = c("aut", "cre"),
@@ 98,7 98,7 @@ git_bundle_create <- function(repos, output.filenames,
invisible(NULL)
}
-git_bundle_pull <- function(bundle, target, branch = "master") {
+git_bundle_pull <- function(bundle, target, branch = "master", ...) {
if (!dir.exists(target))
stop("'target' does not exist. Maybe clone?")
@@ 107,18 107,18 @@ git_bundle_pull <- function(bundle, target, branch = "master") {
on.exit(setwd(current.dir))
setwd(target)
- system2("git", c("pull", bundle, branch))
+ system2("git", c("pull", bundle, branch), ...)
}
-git_bundle_clone <- function(bundle, dir.name, parent.dir) {
+git_bundle_clone <- function(bundle, dir.name, parent.dir, ...) {
if (dir.exists(file.path(parent.dir, dir.name)))
- stop("'dir.name' already exists. Maybe pull?")
+ stop("directory ", sQuote(dir.name), " already exists. Maybe pull?")
current.dir <- getwd()
on.exit(setwd(current.dir))
setwd(parent.dir)
- system2("git", c("clone", "-b", "master", bundle, dir.name))
+ system2("git", c("clone", "-b", "master", bundle, dir.name), ...)
}