Conversation
| if (!quiet) { | ||
| message("Downloading GitLab repo ", x$username, "/", x$repo, "@", x$ref, | ||
| "\nfrom URL ", src) | ||
| message("Downloading GitLab repo ", gsub("/$", "", x$username, "/", x$repo, "/", x$subdir), |
There was a problem hiding this comment.
Are you actually getting a trailing slash in the subdirectory or just being cautious? In general I would consider specs with a trailing slash to be invalid input, and actually it seems parse_git_repo() strips them anyway, so you can remove the gsub here and below I think.
> parse_git_repo("foo/bar/baz/")
$username
[1] "foo"
$repo
[1] "bar"
$subdir
[1] "baz"There was a problem hiding this comment.
Oh now that I look at this again this handles the case when subdir is empty. I think a better approach is to use paste0(c(x$username, x$repo, x$subdir), collapse = "/")
|
I am also missing this functionality of installing packages from a path with three levels (not sure if it is a subgroup or subdirectory). Having tried out this branch I still run into problems. As far as I can see
The first two works for me, but the last one fails. With this change it works for me. |
|
IMHO we should avoid overloading the meaning of I think it would be better to augment the parser so that there's a way to parse sub-directories and sub-groups separately (either globally or just a GitLab-only parser). |
A quick and dirty prototype workaround to address issue #259.
As the
install_gitlabseems to not support (yet) subdirectories, the workaround is based on thesubdirvariable. However in case a repo is inside a subgroup there is a mismatch –subdircorresponds to a repository, andrepoto a subgroup (result of the general parsing rules in parse_repo_spec). How about fixing that mismatch with a new dedicatedparse_repo_gitlabfunction?