-
Notifications
You must be signed in to change notification settings - Fork 156
Closed
Description
When an SHA is given for ref in install_git() with git = "external" it fails with
Error in read.table(file = file, header = header, sep = sep, quote = quote, :
no lines available in input
This seems to be because remote_sha.xgit_remote tries to execute a command equivalent to:
git ls-remote https://github.com/milesmcbain/datapasta.git dddf83b317254c495c38897bf857a9e6a032070f
Which returns no output.
I see this case is handled in remote_sha.git2r_remote with this this code:
# If none found, it is either a SHA, so return the pinned sha or NA
if (length(found) == 0) {
return(remote$ref %||% NA_character_)
}
And I believe a similar strategy would resolve this issue, e.g.
refs <- git(paste("ls-remote", url, ref))
if (length(refs) == 0) {
return(remote$ref %||% NA_character_)
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels