2.39 Remote
(require libgit2/include/remote) | package: libgit2 |
procedure
(git_remote_add_fetch repo remote refspec) → integer?
repo : repository? remote : string? refspec : string?
Add the given refspec to the fetch list in the configuration. No loaded remote instances will be affected.
procedure
(git_remote_add_push repo remote refspec) → integer?
repo : repository? remote : string? refspec : string?
Add the given refspec to the push list in the configuration. No loaded remote instances will be affected.
procedure
(git_remote_connect remote direction callbacks proxy_opts custom_headers) → integer? remote : remote? direction : git_direction callbacks : remote_callbacks? proxy_opts : git_proxy_opts? custom_headers : strarray?
The transport is selected based on the URL. The direction argument is due to a limitation of the git protocol (over TCP or SSH) which starts up a specific binary which can only do the one or the other.
procedure
(git_remote_connected remote) → boolean?
remote : remote?
Check whether the remote’s underlying transport is connected to the remote host.
procedure
repo : repository? url : string?
Create a remote with the given url in-memory. You can use this when you have a URL instead of a remote’s name.
procedure
(git_remote_create_with_fetchspec repo name url fetch) → remote? repo : repository? name : string? url : string? fetch : string?
procedure
(git_remote_default_branch out remote) → integer?
out : buf? remote : remote?
The default branch of a repository is the branch which HEAD points to. If the remote does not support reporting this information directly, it performs the guess as git does; that is, if there are multiple branches which point to the same commit, the first one is chosen. If the master branch is a candidate, it wins.
This function must only be called after connecting.
All remote-tracking branches and configuration settings for the remote will be removed.
procedure
(git_remote_disconnect remote) → void?
remote : remote?
Close the connection to the remote.
procedure
(git_remote_download remote refspecs opts) → integer?
remote : remote? refspecs : strarray? opts : (or/c git_fetch_opts? #f)
Connect to the remote if it hasn’t been done yet, negotiate with the remote git which objects are missing, download and index the packfile.
The .idx file will be created and both it and the packfile with be renamed to their final name.
Call git_remote_free to free the data.
procedure
(git_remote_fetch remote refspecs opts reflog_message) → integer? remote : remote? refspecs : (or/c strarray? #f) opts : (or/c git_fetch_options? #f) reflog_message : (or/c string? #f)
Convenience function to connect to a remote, download the data, disconnect and update the remote-tracking branches.
procedure
(git_remote_free remote) → void?
remote : remote?
This also disconnects from the remote, if the connection has not been closed yet (using git_remote_disconnect).
procedure
(git_remote_get_fetch_refspecs array remote) → integer? array : strarray? remote : remote?
The memory is owned by the user and should be freed with git_strarray_free.
procedure
(git_remote_get_push_refspecs array remote) → integer?
array : strarray? remote : remote?
The memory is owned by the user and should be freed with git_strarray_free.
procedure
(git_remote_init_callbacks opts version) → integer?
opts : git_remote_callbacks? version : integer?
procedure
(git_remote_list out repo) → integer?
out : strarray? repo : repository?
The string array must be freed by the user.
procedure
repo : repository? name : string?
The name will be checked for validity. See git_tag_create() for rules about valid names.
procedure
(git_remote_ls remote) → any
remote : remote?
Get the list of references with which the server responds to a new connection.
The remote (or more exactly its transport) must have connected to the remote repository. This list is available as soon as the connection to the remote is initiated and it remains available after disconnecting.
The memory belongs to the remote. The pointer will be valid as long as a new connection is not initiated, but it is recommended that you make a copy in order to make use of the data.
Returns (values (out : (cpointer remote_head?)) (size : integer?)). See Multiple Values
procedure
(git_remote_name remote) → string?
remote : remote?
procedure
(git_remote_prune remote callbacks) → integer?
remote : remote? callbacks : (or/c git_remote_callbacks? #f)
procedure
(git_remote_prune_refs remote) → integer?
remote : remote?
procedure
(git_remote_push remote refspecs opts) → integer?
remote : remote? refspecs : strarray? opts : (or/c git_push_opns? #f)
Peform all the steps from a push.
procedure
(git_remote_pushurl remote) → string?
remote : remote?
If url.*.pushInsteadOf has been configured for this URL, it will return the modified URL.
procedure
(git_remote_refspec_count remote) → integer?
remote : remote?
procedure
(git_remote_rename problems repo name new_name) → integer? problems : strarray? repo : repository? name : string? new_name : string?
All remote-tracking branches and configuration settings for the remote are updated.
The new name will be checked for validity. See git_tag_create() for rules about valid names.
No loaded instances of a the remote with the old name will change their name or their list of refspecs.
procedure
(git_remote_set_autotag repo remote value) → integer?
repo : repository? remote : string? value : git_remote_autotag_option_t
The change will be made in the configuration. No loaded remotes will be affected.
procedure
(git_remote_set_pushurl repo remote url) → integer?
repo : repository? remote : string? url : string?
Remote objects already in memory will not be affected. This assumes the common case of a single-url remote and will otherwise return an error.
procedure
(git_remote_set_url repo remote url) → integer?
repo : repository? remote : string? url : string?
Remote objects already in memory will not be affected. This assumes the common case of a single-url remote and will otherwise return an error.
procedure
(git_remote_stop remote) → void?
remote : remote?
At certain points in its operation, the network code checks whether the operation has been cancelled and if so stops the operation.
procedure
(git_remote_update_tips remote callbacks update_fetchhead download_tags reflog_message) → integer? remote : remote? callbacks : git_remote_callbacks? update_fetchhead : boolean? download_tags : git_remote_autotag_option_t reflog_message : string?
procedure
(git_remote_upload remote refspecs opts) → integer?
remote : remote? refspecs : strarray? opts : git_push_options?
Connect to the remote if it hasn’t been done yet, negotiate with the remote git which objects are missing, create a packfile with the missing objects and send it.
procedure
(git_remote_url remote) → string?
remote : remote?
If url.*.insteadOf has been configured for this URL, it will return the modified URL.