Permalink
Browse files

Added a much cleaner \.git substitution.

  • Loading branch information...
1 parent 2435934 commit 6a635813d967dd159bf8ac550cdcce044dc18141 David Coallier committed Dec 14, 2012
Showing with 3 additions and 9 deletions.
  1. +3 −9 R/install-git.r
View
12 R/install-git.r
@@ -41,17 +41,11 @@ install_git <- function(git_url, name = NULL, subdir = NULL,
install_git_single <- function(git_url, name = NULL, subdir = NULL,
git_binary = NULL, config = list(), ...) {
if (is.null(name)) {
- name <- basename(git_url)
-
- # Following the feedback from @wch, we remove
- # the "git" suffix from the name of the clone folder.
- parts = unlist(strsplit(name, ".", fixed=TRUE))
-
- if (tail(parts, n=1) == 'git') {
- name = paste(head(parts, n=-1), collapse=".")
- }
+ name <- basename(git_url)
}
+ name <- gsub("\\.git$", "", name)
+
message("Preparing installation of ", name, " using the Git-URL: ", git_url)
# Unique temporary file-name.

0 comments on commit 6a63581

Please sign in to comment.