On this page:
8.18
top
up

36RemoteπŸ”— i

procedure

( git_remote_add_fetchreporemoterefspec)integer?

repo:repository?
remote:string?
refspec:string?
Add a fetch refspec to the remote’s configuration

Add the given refspec to the fetch list in the configuration. No loaded remote instances will be affected.

procedure

( git_remote_add_pushreporemoterefspec)integer?

repo:repository?
remote:string?
refspec:string?
Add a push refspec to the remote’s configuration

Add the given refspec to the push list in the configuration. No loaded remote instances will be affected.

procedure

( git_remote_autotagremote)git_remote_autotag_opt_t

remote:remote?
Retrieve the tag auto-follow setting

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?
Open a connection to a remote

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_connectedremote)boolean?

remote:remote?
Check whether the remote is connected

Check whether the remote’s underlying transport is connected to the remote host.

procedure

( git_remote_createreponameurl)remote?

repo:repository?
name:string?
url:string?
Add a remote with the default fetch refspec to the repository’s configuration.

procedure

( git_remote_create_anonymousrepourl)remote?

repo:repository?
url:string?
Create an anonymous remote

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?
Add a remote with the provided fetch refspec (or default if NULL) to the repository’s configuration.

procedure

( git_remote_default_branchoutremote)integer?

out:buf?
remote:remote?
Retrieve the name of the remote’s default branch

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.

procedure

( git_remote_deletereponame)integer?

repo:repository?
name:string?
Delete an existing persisted remote.

All remote-tracking branches and configuration settings for the remote will be removed.

procedure

( git_remote_disconnectremote)void?

remote:remote?
Disconnect from the remote

Close the connection to the remote.

procedure

( git_remote_downloadremoterefspecsopts)integer?

remote:remote?
refspecs:strarray?
opts:(or/c git_fetch_opts?#f)
Download and index the packfile

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.

procedure

( git_remote_dupsource)remote?

source:remote?
Create a copy of an existing remote. All internal strings are also duplicated. Callbacks are not duplicated.

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)
Download new data and update tips

Convenience function to connect to a remote, download the data, disconnect and update the remote-tracking branches.

procedure

( git_remote_freeremote)void?

remote:remote?
Free the memory associated with a 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?
Get the remote’s list of fetch refspecs

The memory is owned by the user and should be freed with git_strarray_free.

procedure

( git_remote_get_push_refspecsarrayremote)integer?

array:strarray?
remote:remote?
Get the remote’s list of push refspecs

The memory is owned by the user and should be freed with git_strarray_free.

procedure

( git_remote_get_refspecremoten)integer?

remote:remote?
Get a refspec from the remote

procedure

( git_remote_init_callbacksoptsversion)integer?

opts:git_remote_callbacks?
version:integer?
Initializes a git_remote_callbacks with default values. Equivalent to creating an instance with GIT_REMOTE_CALLBACKS_INIT.

procedure

( git_remote_is_valid_nameremote_name)boolean?

remote_name:string?
Ensure the remote name is well-formed.

procedure

( git_remote_listoutrepo)integer?

out:strarray?
repo:repository?
Get a list of the configured remotes for a repo

The string array must be freed by the user.

procedure

( git_remote_lookupreponame)remote?

repo:repository?
name:string?
Get the information for a particular remote

The name will be checked for validity. See git_tag_create() for rules about valid names.

procedure

( git_remote_lsremote)any

remote:remote?
Get the remote repository’s reference advertisement list

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:(cpointerremote_head?))(size:integer? )). See Multiple Values

procedure

( git_remote_nameremote)string?

remote:remote?
Get the remote’s name

procedure

( git_remote_ownerremote)repository?

remote:remote?
Get the remote’s repository

procedure

( git_remote_pruneremotecallbacks)integer?

remote:remote?
callbacks:(or/c git_remote_callbacks?#f)
Prune tracking refs that are no longer present on remote

procedure

( git_remote_prune_refsremote)integer?

remote:remote?
Retrieve the ref-prune setting

procedure

( git_remote_pushremoterefspecsopts)integer?

remote:remote?
refspecs:strarray?
opts:(or/c git_push_opns?#f)
Perform a push

Peform all the steps from a push.

procedure

( git_remote_pushurlremote)string?

remote:remote?
Get the remote’s url for pushing

If url.*.pushInsteadOf has been configured for this URL, it will return the modified URL.

procedure

( git_remote_refspec_countremote)integer?

remote:remote?
Get the number of refspecs for a remote

procedure

( git_remote_rename problems
repo
name
new_name)integer?
problems:strarray?
repo:repository?
name:string?
new_name:string?
Give the remote a new name

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_autotagreporemotevalue)integer?

repo:repository?
remote:string?
value:git_remote_autotag_option_t
Set the remote’s tag following setting.

The change will be made in the configuration. No loaded remotes will be affected.

procedure

( git_remote_set_pushurlreporemoteurl)integer?

repo:repository?
remote:string?
url:string?
Set the remote’s url for pushing in the configuration.

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_urlreporemoteurl)integer?

repo:repository?
remote:string?
url:string?
Set the remote’s url in the configuration

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_statsremote)git_transfer_progress?

remote:remote?
Get the statistics structure that is filled in by the fetch operation.

procedure

( git_remote_stopremote)void?

remote:remote?
Cancel the operation

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?
Update the tips to the new state

procedure

( git_remote_uploadremoterefspecsopts)integer?

remote:remote?
refspecs:strarray?
opts:git_push_options?
Create a packfile and send it to the server

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_urlremote)string?

remote:remote?
Get the remote’s url

If url.*.insteadOf has been configured for this URL, it will return the modified URL.

procedure

( git_fetch_init_optionsoptsversion)integer?

opts:git_fetch_opts?
version:integer?
Initializes a git_fetch_options struct.

procedure

( git_push_init_optionsoptsversion)integer?

opts:git_push_opts?
version:integer?
Initializes a git_fetch_options struct.

top
up

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /