~enricoschumann/esutils

0de029ae7ddea0efc9ea66bc0f877511e3c13198 — Enrico Schumann 2 years ago 547ba24
[find_git] Add argument 'nchar'
3 files changed, 11 insertions(+), 4 deletions(-)

M ChangeLog
M DESCRIPTION
M R/repos.R
M ChangeLog => ChangeLog +7 -2
@@ 1,6 1,11 @@
2022-08-26  Enrico Schumann  <es@enricoschumann.net>

        * R/repos.R (find_git): add argument 'nchar', to
        exclude too-long path names on Windows

2022-08-24  Enrico Schumann  <es@enricoschumann.net>

	* R/backup.R (path8.3): add function
        * R/backup.R (path8.3): add function

2022-05-20  Enrico Schumann  <es@enricoschumann.net>



@@ 40,7 45,7 @@

2021-03-18  Enrico Schumann  <es@enricoschumann.net>

        * R/functions.R (short_fn): use 'iconv' to onvert to
        * R/functions.R (short_fn): use 'iconv' to convert to
        ASCII instead of replacing specific characters

        * DESCRIPTION (Suggests): add 'tinytest'

M DESCRIPTION => DESCRIPTION +1 -1
@@ 2,7 2,7 @@ Package: esutils
Type: Package
Title: esutils
Version: 0.3-0
Date: 2022-08-24
Date: 2022-08-26
Maintainer: Enrico Schumann <es@enricoschumann.net>
Authors@R: person(given = "Enrico", family = "Schumann",
                  role  = c("aut", "cre"),

M R/repos.R => R/repos.R +3 -1
@@ 1,9 1,11 @@
find_git <- function(path = ".", tilde = TRUE, ...) {
find_git <- function(path = ".", tilde = TRUE, max.char = NA,...) {

    f <- dir(path = path,
             include.dirs = TRUE,
             recursive = TRUE, full.names = TRUE,
             all.files = TRUE)
    if (is.finite(max.char))
        f <- f[nchar(f) <= max.char]
    f <- f[basename(f) == ".git"]
    f <- f[file.info(f, extra_cols = FALSE)$isdir]
    f <- normalizePath(f)