Skip to content

Commit

Permalink
Now startup() ignores files and folders specific version control [#131
Browse files Browse the repository at this point in the history
]
  • Loading branch information
HenrikBengtsson committed Jul 29, 2024
1 parent 8b07ca0 commit 95fe0db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: startup
Version: 0.21.0-9009
Version: 0.21.0-9010
Title: Friendly R Startup Configuration
Depends: R (>= 2.14.0)
Suggests: commonmark, tools, tcltk
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
* Now `install()` and `uninstall()` respect environment variable
`R_PROFILE_USER`, if specified.

* Now `startup()` ignores files and folders specific version control, e.g.
`.git`, `.gitignore`, `.hg`, `.hgignore`, and `.svn`.


## Bug Fixes

* `startup(debug = TRUE)` did not report on global variables starting
Expand Down
3 changes: 3 additions & 0 deletions R/find_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ list_d_files <- function(paths, recursive = TRUE, filter = NULL) {
## (double period)
files <- grep("(^|/|\\\\)[.][.]", files, value = TRUE, invert = TRUE)

## Drop version control files
files <- grep("([.]git|[.]gitignore|[.]hg|[.]hgignore|[.]p4config|[.]p4ignore|[.]svn)$", files, value = TRUE, invert = TRUE)

## Nothing to do?
if (length(files) == 0) return(character(0))

Expand Down

0 comments on commit 95fe0db

Please sign in to comment.