-
Notifications
You must be signed in to change notification settings - Fork 153
Submodules #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Submodules #138
Conversation
Codecov Report
@@ Coverage Diff @@
## master #138 +/- ##
=========================================
- Coverage 93.26% 83% -10.27%
=========================================
Files 27 28 +1
Lines 1514 1600 +86
=========================================
- Hits 1412 1328 -84
- Misses 102 272 +170
Continue to review full report at Codecov.
|
@jimhester Is this ready? |
@gaborcsardi I was adding some tests, it is ready now if you could review it! |
Oh I guess the only other thing this could maybe have is a git2r version, right now it relies on having a command line git only. I can add it if you think we need it. |
I think it is fine with system git. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
R/submodule.R
Outdated
# escaping them as \" and \\ | ||
double_quoted_string_with_escapes <- '(?:\\\\.|[^"])*' | ||
|
||
sections <- regexpr( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should just include a collated rematch2 package, that would simplify things.
tests/testthat/test-submodule.R
Outdated
}) | ||
|
||
test_that("Can install a repo with a submodule", { | ||
dir <- tempfile() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to skip if no system git. (If we are skipping the other tests that rely on system git.)
Ok I added the |
I think it is good now. I think if we want to be completely correct we would need to use the I don't think we need to change it now, just sg. to think about next time we write sg for git. |
The issue with that is the zipball we get from GitHub is not actually a git repository, e.g. it doesn't have a |
Got it. Yeah, these would only matter for local installs. All good then! |
Thanks for the review! |
This still needs some tests, but it works for simple cases, e.g.
install_github("https://github.com/jonkeane/mocapGrip")