This function inserts the given (source or binary) package file
into the given (local) package repository and updates the
index. By setting the commit
option to TRUE
, one can
then push to a remote git code repository. If the
git2r
package is installed, it is used for
the interaction with the git repository; otherwise the git
shell command is used.
An aliased function insert
is also available, but not
exported via NAMESPACE
to not clobber a possibly unrelated
function; use it via drat:::insert()
.
The function also checks for a top-level index.html
file to ensure
external tests against the repository (as for example done by CRAN if you
list the repository as an ‘Additional_repositories’ in a package)
do not return a ‘404’ error. If missing, a simple one-line example is
shown.