include/git2/remote.h


Log

Author Commit Date CI Message
Etienne Samson 764196ff 2019-06-13T20:17:01 doc: add missing documentation comments
Edward Thomson 0b5ba0d7 2019-06-06T16:36:23 Rename opt init functions to `options_init` In libgit2 nomenclature, when we need to verb a direct object, we name a function `git_directobject_verb`. Thus, if we need to init an options structure named `git_foo_options`, then the name of the function that does that should be `git_foo_options_init`. The previous names of `git_foo_init_options` is close - it _sounds_ as if it's initializing the options of a `foo`, but in fact `git_foo_options` is its own noun that should be respected. Deprecate the old names; they'll now call directly to the new ones.
Erik Aigner 59647e1a 2019-04-08T15:54:25 remote: add callback to resolve URLs before connecting Since libssh2 doesn't read host configuration from the config file, this callback can be used to hand over URL resolving to the client without touching the SSH implementation itself.
Edward Thomson 2dd5a429 2019-02-25T13:16:13 remote: Rename git_remote_completion_type to _t For consistency with other "type" enums, rename git_remote_completion_type to git_remote_completion_t.
Edward Thomson 59001e83 2019-02-21T11:41:19 remote: rename git_push_transfer_progress callback The `git_push_transfer_progress` is a callback and as such should be suffixed with `_cb` for consistency. Rename `git_push_transfer_progress` to `git_push_transfer_progress_cb`.
Edward Thomson a1ef995d 2019-02-21T10:33:30 indexer: use git_indexer_progress throughout Update internal usage of `git_transfer_progress` to `git_indexer_progreses`.
Edward Thomson 22d2062d 2019-01-09T18:25:10 Introduce GIT_CALLBACK macro to enforce cdecl Since we now always build the library with cdecl calling conventions, our callbacks should be decorated as such so that users will not be able to provide callbacks defined with other calling conventions. The `GIT_CALLBACK` macro will inject the `__cdecl` attribute as appropriate.
Etienne Samson d3650294 2018-06-20T02:27:14 remote: add a flag to prevent generation of the default fetchspec
Etienne Samson fdb116b3 2018-06-20T02:27:12 remote: add a creation flag for ignoring url.insteadOf
Etienne Samson 3cbaebdf 2018-06-20T02:27:11 remote: provide a generic API for creating remotes This supersedes the functionality of remote_create_with_fetchspec, remote_create_anonymous and remote_create_detached.
Etienne Samson 9890f059 2018-08-29T22:04:42 push: make the parallelism default follow the docs
Etienne Samson ca5a15e5 2018-03-22T23:27:27 docs: standardize comment block for git_*_init_options functions
Carson Howard e6c720ea 2018-03-27T10:05:21 remote/proxy: fix git_transport_certificate_check_db comment
Carson Howard 7138ce37 2017-10-06T07:16:26 remote: add typedef to normalize push_update_reference callback Very many callbacks in libgit2 have some sort of typedef to normalize the name at git_<name_of_operation>_cb. Add a typedef for push_update_references in the remote so the name follows the same conventions.
Eric Myhre 4bc16c37 2016-07-08T01:37:22 remote: add function to create detached remotes Right now it is only possible to create remotes from a repository. While this is probably the most common use-case, there are commands which make sense even without a repository, e.g. the equivalence of `git ls-remote`. Add a new function `git_remote_create_detached`, which simply accepts a URL.
Edward Thomson 45071cec 2017-05-01T15:23:27 git_remote_push: document that NULL refspecs allowed
Remy Suen 12b7394c 2017-03-20T22:30:37 Fix typo in remote.h API
Carlos Martín Nieto 75db289a 2016-12-20T19:14:20 Merge pull request #3980 from tiennou/doc-fixes Documentation fixes
Josh Bleecher Snyder 72cee168 2016-12-02T16:14:47 remote: fix typo in git_fetch_init_options docs
Etienne Samson 788fcdb8 2016-11-01T17:46:57 remote: fix documentation and indent
Etienne Samson 2adac910 2016-11-01T17:46:37 remote: unused function typedef
Carlos Martín Nieto 07bd3e57 2015-05-07T12:57:56 proxy: ask the user for credentials if necessary
Josh Junon fc15befd 2016-04-12T21:50:18 Add missing ')' to callbacks documentation Super minor, but it was bugging me. There was a missing closing paren in the docs.
Matt Burke c49126c8 2015-09-10T08:34:35 Accept custom headers for fetch too
Matt Burke 4f2b6093 2015-09-08T13:53:41 Tell the git_transport about the custom_headers
Matt Burke 9da32a62 2015-09-08T10:18:54 Add custom_headers to git_push_options
Matt Burke 24f5b4e1 2015-09-08T13:34:42 Drop extra_http_headers from git_remote
Matt Burke 59d6128e 2015-09-04T09:36:50 Allow the world to set HTTP headers for remotes
Ryan Roden-Corrent 37996d47 2015-07-20T09:21:36 Document git_fetch_options struct and fix typo. git_fetch_options was missing from the API docs because it lacked a documentation comment above the struct declaration. I used the git_checkout_options docstring as a template. Also fixes a typo in git_remote_prune_refs (remote, not reamote).
Carlos Martín Nieto c2418f46 2015-06-25T12:48:44 Rename FALLBACK to UNSPECIFIED Fallback describes the mechanism, while unspecified explains what the user is thinking.
Patrick Steinhardt ec0c4c40 2015-05-04T11:59:20 remote: apply insteadOf configuration. A remote's URLs are now modified according to the url.*.insteadOf and url.*.pushInsteadOf configurations. This allows a user to replace URL prefixes by setting the corresponding keys. E.g. "url.foo.insteadOf = bar" would replace the prefix "bar" with the new prefix "foo".
Carlos Martín Nieto 2b922832 2015-05-28T16:09:17 Merge pull request #3127 from libgit2/cmn/remote-fixups Tackle remote API issues from bindings
Carlos Martín Nieto c6e942fb 2015-05-17T15:19:22 remote: validate refspecs before adding to config When we moved from acting on the instance to acting on the configuration, we dropped the validation of the passed refspec, which can lead to writing an invalid refspec to the configuration. Bring that validation back.
Carlos Martín Nieto ae5b9362 2015-05-17T15:11:45 remote: remove fetch parameter from create_anonymous An anonymous remote is not configured and cannot therefore have configured refspecs. Remove the parameter which adds this from the constructor.
Jason Haslam d30155f2 2015-05-20T14:26:05 Fix error when building as C++.
Carlos Martín Nieto 70f7484d 2015-05-14T09:35:08 remote: get rid of the run-time refspec setters These were left over from the culling as it's not clear which use-cases might benefit from this. It is not clear that we want to support any use-case which depends on changing the remote's idea of the base refspecs rather than passing in different per-operation refspec list, so remove these functions.
Carlos Martín Nieto a4b6452a 2015-04-23T06:55:29 remote: remove git_remote_save() It has now become a no-op, so remove the function and all references to it.
Carlos Martín Nieto 77254990 2015-04-23T06:51:34 remote: remove live changing of refspecs The base refspecs changing can be a cause of confusion as to what is the current base refspec set and complicate saving the remote's configuration. Change `git_remote_add_{fetch,push}()` to update the configuration instead of an instance. This finally makes `git_remote_save()` a no-op, it will be removed in a later commit.
Carlos Martín Nieto 35a8a8c5 2015-04-22T17:29:20 remote: move the tagopt setting to the fetch options This is another option which we should not be keeping in the remote, but is specific to each particular operation.
Carlos Martín Nieto 3eff2a57 2015-04-22T16:11:10 remote: move the update_fetchhead setting to the options While this will rarely be different from the default, having it in the remote adds yet another setting it has to keep around and can affect its behaviour. Move it to the options.
Carlos Martín Nieto 058b753c 2015-04-22T15:45:21 remote: move the transport ctor to the callbacks Instead of having it set in a different place from every other callback, put it the main structure. This removes some state from the remote and makes it behave more like clone, where the constructors are passed via the options.
Carlos Martín Nieto 6fb373a0 2015-04-22T04:54:00 remote: add prune option to fetch Add a prune setting in the fetch options to allow to fall back to the configuration (the default) or to set it on or off.
Carlos Martín Nieto 22261344 2015-04-22T04:38:08 remote: remove url and pushurl from the save logic As a first step in removing the repository-saving logic, don't allow chaning the url or push url from a remote object, but change the configuration on the configuration immediately.
Carlos Martín Nieto 8f0104ec 2015-04-21T22:10:36 Remove the callbacks struct from the remote Having the setting be different from calling its actions was not a great idea and made for the sake of the wrong convenience. Instead of that, accept either fetch options, push options or the callbacks when dealing with the remote. The fetch options are currently only the callbacks, but more options will be moved from setters and getters on the remote to the options. This does mean passing the same struct along the different functions but the typical use-case will only call git_remote_fetch() or git_remote_push() and so won't notice much difference.
Carlos Martín Nieto efc2fec5 2015-04-19T00:55:00 push: report the update plan to the caller It can be useful for the caller to know which update commands will be sent to the server before the packfile is pushed up. git does this via the pre-push hook. We don't have hooks, but as it adds introspection into what is happening, we can add a callback which performs the same function.
Carlos Martín Nieto 412a3808 2015-01-15T15:31:23 push: remove reflog message override We always use "update by push".
Carlos Martín Nieto 659cf202 2015-01-07T12:23:05 Remove the signature from ref-modifying functions The signature for the reflog is not something which changes dynamically. Almost all uses will be NULL, since we want for the repository's default identity to be used, making it noise. In order to allow for changing the identity, we instead provide git_repository_set_ident() and git_repository_ident() which allow a user to override the choice of signature.
Edward Thomson a3ef70bb 2014-12-30T11:53:55 Merge pull request #2761 from libgit2/cmn/fetch-prune Remote-tracking branch prunning
Carlos Martín Nieto fe794b2e 2014-12-16T08:57:05 remote: remove git_push from the public API Instead we provide git_remote_upload() and git_remote_update_tips() in order to have a parallel API for fetching and pushing.
Carlos Martín Nieto 26186b15 2014-12-14T21:01:19 fetch: remove the prune setter This option does not get persisted to disk, which makes it different from the rest of the setters. Remove it until we go all the way. We still respect the configuration option, and it's still possible to perform a one-time prune by calling the function.
Linquize 5f473947 2014-09-22T23:17:35 remote: prune refs when fetching
Carlos Martín Nieto a295bd2d 2014-12-06T03:36:18 doc: add documentation to all the public structs and enums This makes them show up in the reference, even if the text itself isn't the most descriptive. These have been found with grep -Przon '\n\ntypedef struct.*?\{' -- include grep -Przon '\n\ntypedef enum.*?\{' -- include
Will Stamper b874629b 2014-12-04T21:06:59 Spelling fixes
Carlos Martín Nieto 8fd7dd77 2014-11-19T15:49:47 remote: don't say we free the remote on disconnect On disconnect we simply ask the transport to close the connection, we do not free it.
Carlos Martín Nieto 699dfcc3 2014-11-19T15:49:02 remote: clarify which list of references _ls() returns Make it clear that this is not the ls-remote command but a way to access the data we have and how long it's kept around.
Carlos Martín Nieto 64e3e6d4 2014-10-11T12:25:50 remote: use configured push refspecs if none are given If the user does not pass any refspecs to push, try to use those configured via the configuration or via add_push().
Carlos Martín Nieto 3149547b 2014-10-10T12:39:53 remote: introduce git_remote_push() This function, similar in style to git_remote_fetch(), performs all the steps required for a push, with a similar interface. The remote callbacks struct has learnt about the push callbacks, letting us set the callbacks a single time instead of setting some in the remote and some in the push operation.
Carlos Martín Nieto 209425ce 2014-11-08T13:25:51 remote: rename _load() to _lookup() This brings it in line with the rest of the lookup functions.
Edward Thomson 725cd5f2 2014-10-24T16:44:07 Merge pull request #2646 from libgit2/cmn/remote-rename remote: accept a repo and name for renaming
Carlos Martín Nieto 46c8f7f8 2014-10-24T16:25:59 remote: accept a repo and name for renaming Remote objects are not meant to be changed from under the user. We did this in rename, but only the name and left the refspecs, such that a save would save the wrong refspecs (and a fetch and anything else would use the wrong refspecs). Instead, let's simply take a name and not change any loaded remote from under the user.
Carlos Martín Nieto 0862f617 2014-10-24T12:19:13 remote: delete git_remote_supported_url() This function does not in fact tell us anything, as almost anything with a colon in it is a valid rsync-style SSH path; it can not tell us that we do not support ftp or afp or similar as those are still valid SSH paths and we do support that.
Edward Thomson a6ed1fcb 2014-10-10T12:21:28 Merge pull request #2593 from libgit2/cmn/remote-delete-name remote: accept a repository and remote name for deletion
Arthur Schreiber 8e398e4c 2014-10-10T13:17:53 Treat an empty list of refspecs the same as a NULL value.
Carlos Martín Nieto 262eec23 2014-09-30T16:07:30 remote: accept a repository and remote name for deletion We don't need the remote loaded, and the function extracted both of these from the git_remote in order to do its work, so let's remote a step and not ask for the loaded remote at all. This fixes #2390.
Carlos Martín Nieto 3f894205 2014-06-06T15:01:45 remote: allow overriding the refspecs for download and fetch With opportunistic ref updates, git has introduced the concept of having base refspecs *and* refspecs that are active for a particular fetch. Let's start by letting the user override the refspecs for download.
Carlos Martín Nieto 0fef3899 2014-09-16T01:25:53 Merge remote-tracking branch 'upstream/master' into cmn/host-cert-info
Carlos Martín Nieto 41698f22 2014-09-11T10:04:05 net: remove support for outright ignoring certificates This option make it easy to ignore anything about the server we're connecting to, which is bad security practice. This was necessary as we didn't use to expose detailed information about the certificate, but now that we do, we should get rid of this. If the user wants to ignore everything, they can still provide a callback which ignores all the information passed.
Carlos Martín Nieto 9b940586 2014-07-04T12:45:43 Provide a callback for certificate validation If the certificate validation fails (or always in the case of ssh), let the user decide whether to allow the connection. The data structure passed to the user is the native certificate information from the underlying implementation, namely OpenSSL or WinHTTP.
Carlos Martín Nieto ba67c075 2014-08-31T17:16:40 remote: get rid of git_remote_valid_url() It does the same as git_remote_supported_url() but has a name which implies we'd check the URL for correctness while we're simply looking at the scheme and looking it up in our lists. While here, fix up the tests so we check all the combination of what's supported.
Edward Thomson c180c065 2014-07-09T17:58:39 Custom transport: minor cleanups * Move the transport registration mechanisms into a new header under 'sys/' because this is advanced stuff. * Remove the 'priority' argument from the registration as it adds unnecessary complexity. (Since transports cannot decline to operate, only the highest priority transport is ever executed.) Users who require per-priority transports can implement that in their custom transport themselves. * Simplify registration further by taking a scheme (eg "http") instead of a prefix (eg "http://").
Philip Kelley 1697cd6f 2014-06-25T13:20:27 Improvements to git_transport extensibility git_remote_set_transport now takes a transport factory rather than a transport git_clone_options now allows the caller to specify a remote creation callback
Carlos Martín Nieto 281da004 2014-06-09T19:35:41 remote: fix rename docs
Carlos Martín Nieto 231f350d 2014-06-06T22:55:34 remote: don't free the remote on delete This was a bad idea. Don't free except in the free function.
Carlos Martín Nieto 72bca13e 2014-06-06T16:33:54 remote: return problem refspecs instead of using a callback There is no reason why we need to use a callback here. A string array fits better with the usage, as this is not an event and we don't need anything from the user.
Carlos Martín Nieto d22db24f 2014-05-21T09:32:35 remote: add api to guess the remote's default branch If the remote supports the symref protocol extension, then we return that, otherwise we guess with git's rules.
Vicent Marti 228272ef 2014-05-16T11:56:37 Merge pull request #2313 from libgit2/cmn/remote-delete Remote deletion
Russell Belfer bc91347b 2014-04-30T11:16:31 Fix remaining init_options inconsistencies There were a couple of "init_opts()" functions a few more cases of structure initialization that I somehow missed.
nulltoken 40e48ea4 2013-11-15T15:36:37 remote: Introduce git_remote_delete()
Vicent Marti 8443ed6c 2014-04-25T02:10:19 Merge pull request #2284 from jacquesg/push-progress-callback Fire progress and update tips callbacks also for pushes.
Carlos Martín Nieto bc0a6198 2014-04-19T15:52:58 transports: allow the creds callback to say it doesn't exist Allow the credentials callback to return GIT_PASSTHROUGH to make the transports code behave as though none was set. This should make it easier for bindings to behave closer to the C code when there is no credentials callback set at their level.
Carlos Martín Nieto 2efd7df6 2014-04-19T15:34:12 remote: provide read access to the callback structure This should make it easier for bindings to dynamically override their own callbacks.
Jacques Germishuys 48e60ae7 2014-04-21T11:23:29 Don't redefine the same callback types, their signatures may change
Jacques Germishuys 98020d3a 2014-04-21T10:55:37 Rename progress callback to sideband_progress
Jacques Germishuys 4f62163e 2014-04-20T22:06:05 Check the return codes of remote callbacks. The user may have requested that the operation be cancelled.
Jacques Germishuys 9effa2fb 2014-04-20T19:19:13 Fire progress callbacks also for pushes. It's not very useful to only know that a pre-receive hook has declined a push, you probably want to know why.
Carlos Martín Nieto fd536d29 2014-03-26T11:15:57 remote: rename inmemory to anonymous and swap url and fetch order The order in this function is the opposite to what create_with_fetchspec() has, so change this one, as url-then-refspec is what git does. As we need to break compilation and the swap doesn't do that, let's take this opportunity to rename in-memory remotes to anonymous as that's really what sets them apart.
Matthew Bowen b9f81997 2014-03-05T21:49:23 Added function-based initializers for every options struct. The basic structure of each function is courtesy of arrbee.
Ben Straub db55bb73 2014-02-06T11:18:10 Correct default reflog message for git_remote_fetch
Ben Straub 2bfc6739 2014-02-06T10:39:57 Fix terrible indentation
Ben Straub c3ab1e5a 2014-02-04T20:38:13 Add reflog parameters to remote apis Also added a test for git_remote_fetch.
Arthur Schreiber 991b2840 2014-01-26T19:35:02 Make sure git_remote_dup copies a remote's refspecs correctly.
Arthur Schreiber 11f6ad5f 2014-01-15T21:15:34 Add some missing const declarations.
Arthur Schreiber 40ef47dd 2014-01-14T21:03:01 Add `git_remote_dup`.
Vicent Martí 7b947bf5 2013-11-14T07:21:47 Merge pull request #1951 from victorgp/create-remote-plus-fetch Allowing create remotes with custom fetch spec
Carlos Martín Nieto 359dce72 2013-11-02T00:05:32 remote: make _ls return the list directly The callback-based method of listing remote references dates back to the beginning of the network code's lifetime, when we didn't know any better. We need to keep the list around for update_tips() after disconnect() so let's make use of this to simply give the user a pointer to the array so they can write straightforward code instead of having to go through a callback.
Carlos Martín Nieto 266af6d8 2013-10-30T13:44:22 remote: don't allow such direct access to the refspecs Removing arbitrary refspecs makes things more complex to reason about. Instead, let the user set the fetch and push refspec list to whatever they want it to be.
Victor Garcia 886cc447 2013-11-08T15:42:52 fixing typo
Victor Garcia 40b99d05 2013-11-08T12:14:31 splitting funcionality in two methods to avoid ambiguity with NULL
Victor Garcia 99feb988 2013-11-07T16:22:49 adding doc for new param and test to check fetch spec is correctly added
Victor Garcia 0fe522d1 2013-11-07T14:16:20 allowing create remote with custom fetch spec