Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Proxy Support to
git2r
This pull request introduces proxy support to the
git2r
package.Summary of Changes
Proxy Argument Addition:
R Functions
clone
,fetch
,push
, andremote_ls
now include aproxy
parameter, enabling users to define proxy settings directly within these functions.Proxy Options Handling:
Implementation of internal functions to manage proxy settings, including validation and integration with libgit2's proxy options.
Documentation Updates:
Enhancements to the documentation to reflect the new
proxy
parameter, providing guidance on its usage and possible values.Test Coverage:
Added basic tests for all functions that implement the
proxy
parameter.Details
Functions Updated
clone
: Addedproxy
parameter to specify proxy settings during repository cloning.fetch
: Includedproxy
parameter to define proxy settings when fetching updates from a remote repository.push
: Integratedproxy
parameter to set proxy settings during push operations.remote_ls
: Enhanced to accept aproxy
parameter for listing references in a remote repository through a proxy.Proxy Parameter
The
proxy
parameter takes the following values (corresponding to libgit2`s git_proxy_t):NULL
: No proxy used (default)TRUE
: Try to auto-detect the proxy from the git configuration.Internal Functions
git2r_set_proxy_options
: New function to initialize and set proxy options based on user input.git2r_arg_check_proxy
: Validation function to ensure the provided proxy arguments are of acceptable types (NULL
,TRUE
, or a valid string).Documentation
proxy
parameter.Related issues
Should fix #395 , #278, and possibly #269 .