Skip to content

Commit

Permalink
Register symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
stewid committed Oct 16, 2024
1 parent 081968b commit aac7e63
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 8 deletions.
3 changes: 2 additions & 1 deletion R/blame.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## git2r, R bindings to the libgit2 library.
## Copyright (C) 2013-2018 The git2r contributors
## Copyright (C) 2013-2024 The git2r contributors
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License, version 2,
Expand Down Expand Up @@ -67,6 +67,7 @@
##' }
##' }
##' @export
##' @useDynLib git2r git2r_blame_file
##' @examples
##' \dontrun{
##' ## Initialize a temporary repository
Expand Down
8 changes: 7 additions & 1 deletion R/blob.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## git2r, R bindings to the libgit2 library.
## Copyright (C) 2013-2023 The git2r contributors
## Copyright (C) 2013-2024 The git2r contributors
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License, version 2,
Expand Down Expand Up @@ -31,6 +31,7 @@
##' is TRUE.
##' @return list of S3 class git_blob \code{objects}
##' @export
##' @useDynLib git2r git2r_blob_create_fromworkdir
##' @examples
##' \dontrun{
##' ## Initialize a temporary repository
Expand Down Expand Up @@ -69,6 +70,7 @@ blob_create <- function(repo = ".", path = NULL, relative = TRUE) {
##' @return The content of the blob. NA_character_ if the blob is
##' binary and \code{raw} is \code{FALSE}.
##' @export
##' @useDynLib git2r git2r_blob_content
##' @examples
##' \dontrun{
##' ## Initialize a temporary repository
Expand Down Expand Up @@ -100,6 +102,7 @@ content <- function(blob = NULL, split = TRUE, raw = FALSE) {
##' @param data The string vector to hash.
##' @return A string vector with the sha for each string in data.
##' @export
##' @useDynLib git2r git2r_odb_hash
##' @examples
##' \dontrun{
##' identical(hash(c("Hello, world!\n",
Expand All @@ -117,6 +120,7 @@ hash <- function(data = NULL) {
##' @param path The path vector with files to hash.
##' @return A vector with the sha for each file in path.
##' @export
##' @useDynLib git2r git2r_odb_hashfile
##' @examples
##' \dontrun{
##' ## Create a file. NOTE: The line endings from writeLines gives
Expand All @@ -143,6 +147,7 @@ hashfile <- function(path = NULL) {
##' @param blob The blob \code{object}.
##' @return TRUE if binary data, FALSE if not.
##' @export
##' @useDynLib git2r git2r_blob_is_binary
##' @examples
##' \dontrun{
##' ## Initialize a temporary repository
Expand Down Expand Up @@ -213,6 +218,7 @@ is_blob <- function(object) {
##' @param x The blob \code{object}
##' @return a non-negative integer
##' @export
##' @useDynLib git2r git2r_blob_rawsize
##' @examples
##' \dontrun{
##' ## Initialize a temporary repository
Expand Down
12 changes: 11 additions & 1 deletion R/branch.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## git2r, R bindings to the libgit2 library.
## Copyright (C) 2013-2020 The git2r contributors
## Copyright (C) 2013-2024 The git2r contributors
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License, version 2,
Expand All @@ -23,6 +23,7 @@
##' @param force Overwrite existing branch. Default = FALSE
##' @return invisible git_branch object
##' @export
##' @useDynLib git2r git2r_branch_create
##' @examples
##' \dontrun{
##' ## Initialize a temporary repository
Expand Down Expand Up @@ -62,6 +63,7 @@ branch_create <- function(commit = last_commit(), name = NULL,
##' @param branch The branch
##' @return invisible NULL
##' @export
##' @useDynLib git2r git2r_branch_delete
##' @examples
##' \dontrun{
##' ## Initialize a temporary repository
Expand Down Expand Up @@ -94,6 +96,7 @@ branch_delete <- function(branch = NULL) {
##' @param branch The branch
##' @return character string with remote name
##' @export
##' @useDynLib git2r git2r_branch_remote_name
##' @examples
##' \dontrun{
##' ## Initialize two temporary repositories
Expand Down Expand Up @@ -129,6 +132,7 @@ branch_remote_name <- function(branch = NULL) {
##' @param branch The branch
##' @return character string with remote url
##' @export
##' @useDynLib git2r git2r_branch_remote_url
##' @examples
##' \dontrun{
##' ## Initialize two temporary repositories
Expand Down Expand Up @@ -166,6 +170,7 @@ branch_remote_url <- function(branch = NULL) {
##' @param force Overwrite existing branch. Default is FALSE
##' @return invisible renamed \code{git_branch} object
##' @export
##' @useDynLib git2r git2r_branch_rename
##' @examples
##' \dontrun{
##' ## Initialize a temporary repository
Expand Down Expand Up @@ -194,6 +199,7 @@ branch_rename <- function(branch = NULL, name = NULL, force = FALSE) {
##' @param branch The branch
##' @return sha or NA if not a direct reference
##' @export
##' @useDynLib git2r git2r_branch_target
##' @examples
##' \dontrun{
##' ## Initialize a temporary repository
Expand Down Expand Up @@ -222,6 +228,7 @@ branch_target <- function(branch = NULL) {
##' @return \code{git_branch} object or NULL if no remote tracking
##' branch.
##' @export
##' @useDynLib git2r git2r_branch_get_upstream
##' @examples
##' \dontrun{
##' ## Initialize two temporary repositories
Expand Down Expand Up @@ -260,6 +267,7 @@ branch_get_upstream <- function(branch = NULL) {
##' upstream. Pass NULL to unset.
##' @return invisible NULL
##' @export
##' @useDynLib git2r git2r_branch_set_upstream
##' @examples
##' \dontrun{
##' ## Initialize two temporary repositories
Expand Down Expand Up @@ -307,6 +315,7 @@ branch_set_upstream <- function(branch = NULL, name) {
##' are 'all', 'local' or 'remote'
##' @return list of branches in repository
##' @export
##' @useDynLib git2r git2r_branch_list
##' @examples
##' \dontrun{
##' ## Initialize repositories
Expand Down Expand Up @@ -347,6 +356,7 @@ branches <- function(repo = ".", flags=c("all", "local", "remote")) {
##' @param branch The branch \code{object} to check if it's head.
##' @return \code{TRUE} if branch is head, else \code{FALSE}.
##' @export
##' @useDynLib git2r git2r_branch_is_head
##' @examples
##' \dontrun{
##' ## Initialize a temporary repository
Expand Down
6 changes: 2 additions & 4 deletions R/git2r.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## git2r, R bindings to the libgit2 library.
## Copyright (C) 2013-2023 The git2r contributors
## Copyright (C) 2013-2024 The git2r contributors
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License, version 2,
Expand All @@ -17,11 +17,9 @@
##' git2r: R bindings to the libgit2 library
##'
##' git2r: R bindings to the libgit2 library.
##' @docType package
##' @aliases git2r-package
##' @name git2r
##' @useDynLib git2r, .registration=TRUE
NULL
"_PACKAGE"

##' Unload hook function
##'
Expand Down
5 changes: 4 additions & 1 deletion R/libgit2.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## git2r, R bindings to the libgit2 library.
## Copyright (C) 2013-2018 The git2r contributors
## Copyright (C) 2013-2024 The git2r contributors
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License, version 2,
Expand All @@ -19,6 +19,7 @@
##' @return A list with threads, https and ssh set to TRUE/FALSE.
##' @keywords methods
##' @export
##' @useDynLib git2r git2r_libgit2_features
##' @examples
##' libgit2_features()
libgit2_features <- function() {
Expand All @@ -32,6 +33,7 @@ libgit2_features <- function() {
##' @return A list with major, minor and rev
##' @keywords methods
##' @export
##' @useDynLib git2r git2r_libgit2_version
##' @examples
##' libgit2_version()
libgit2_version <- function() {
Expand All @@ -48,6 +50,7 @@ libgit2_version <- function() {
##' @return invisible(NULL)
##' @keywords methods
##' @export
##' @useDynLib git2r git2r_ssl_cert_locations
ssl_cert_locations <- function(filename = NULL, path = NULL) {
.Call(git2r_ssl_cert_locations, filename, path)
invisible(NULL)
Expand Down

0 comments on commit aac7e63

Please sign in to comment.