summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
Commit message (Collapse)AuthorAgeFilesLines
* remote: remove git_push from the public APIcmn/hide-pushCarlos Martín Nieto2014-12-301-1/+14
| | | | | Instead we provide git_remote_upload() and git_remote_update_tips() in order to have a parallel API for fetching and pushing.
* doc: add documentation to all the public structs and enumscmn/doc-allCarlos Martín Nieto2014-12-061-0/+5
| | | | | | | | | | 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
* Spelling fixesWill Stamper2014-12-041-1/+1
|
* remote: don't say we free the remote on disconnectcmn/remote-lsCarlos Martín Nieto2014-11-191-2/+1
| | | | | On disconnect we simply ask the transport to close the connection, we do not free it.
* remote: clarify which list of references _ls() returnsCarlos Martín Nieto2014-11-191-6/+11
| | | | | 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.
* remote: use configured push refspecs if none are givencmn/remote-pushCarlos Martín Nieto2014-11-091-1/+2
| | | | | If the user does not pass any refspecs to push, try to use those configured via the configuration or via add_push().
* remote: introduce git_remote_push()Carlos Martín Nieto2014-11-091-0/+39
| | | | | | | | | 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.
* remote: rename _load() to _lookup()cmn/remote-lookupCarlos Martín Nieto2014-11-081-1/+1
| | | | This brings it in line with the rest of the lookup functions.
* Merge pull request #2646 from libgit2/cmn/remote-renameEdward Thomson2014-10-241-3/+6
|\ | | | | remote: accept a repo and name for renaming
| * remote: accept a repo and name for renamingcmn/remote-renameCarlos Martín Nieto2014-10-241-3/+6
| | | | | | | | | | | | | | | | | | | | 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.
* | remote: delete git_remote_supported_url()cmn/remove-supported-urlCarlos Martín Nieto2014-10-241-13/+0
|/ | | | | | | 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.
* Merge pull request #2593 from libgit2/cmn/remote-delete-nameEdward Thomson2014-10-101-2/+3
|\ | | | | remote: accept a repository and remote name for deletion
| * remote: accept a repository and remote name for deletioncmn/remote-delete-nameCarlos Martín Nieto2014-09-301-2/+3
| | | | | | | | | | | | | | | | 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.
* | Treat an empty list of refspecs the same as a NULL value.Arthur Schreiber2014-10-101-3/+3
| |
* | remote: allow overriding the refspecs for download and fetchCarlos Martín Nieto2014-09-301-1/+7
|/ | | | | | | 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.
* Merge remote-tracking branch 'upstream/master' into cmn/host-cert-infoCarlos Martín Nieto2014-09-161-8/+5
|\
| * remote: get rid of git_remote_valid_url()Carlos Martín Nieto2014-08-311-8/+5
| | | | | | | | | | | | | | | | | | 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.
* | net: remove support for outright ignoring certificatesCarlos Martín Nieto2014-09-161-8/+0
| | | | | | | | | | | | | | | | | | | | 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.
* | Provide a callback for certificate validationCarlos Martín Nieto2014-09-161-0/+8
|/ | | | | | | | | 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.
* Custom transport: minor cleanupsEdward Thomson2014-08-141-15/+0
| | | | | | | | | | | | * 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://").
* Improvements to git_transport extensibilityPhilip Kelley2014-06-261-8/+7
| | | | | 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
* remote: fix rename docsCarlos Martín Nieto2014-06-091-3/+0
|
* remote: don't free the remote on deletecmn/remote-rename-moreCarlos Martín Nieto2014-06-061-2/+0
| | | | This was a bad idea. Don't free except in the free function.
* remote: return problem refspecs instead of using a callbackCarlos Martín Nieto2014-06-061-3/+5
| | | | | | 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.
* remote: add api to guess the remote's default branchCarlos Martín Nieto2014-05-211-0/+18
| | | | | If the remote supports the symref protocol extension, then we return that, otherwise we guess with git's rules.
* Merge pull request #2313 from libgit2/cmn/remote-deleteVicent Marti2014-05-161-0/+13
|\ | | | | Remote deletion
| * remote: Introduce git_remote_delete()nulltoken2014-04-301-0/+13
| |
* | Fix remaining init_options inconsistenciesRussell Belfer2014-05-021-5/+4
|/ | | | | There were a couple of "init_opts()" functions a few more cases of structure initialization that I somehow missed.
* Merge pull request #2284 from jacquesg/push-progress-callbackVicent Marti2014-04-251-3/+3
|\ | | | | Fire progress and update tips callbacks also for pushes.
| * Don't redefine the same callback types, their signatures may changeJacques Germishuys2014-04-211-3/+3
| |
| * Rename progress callback to sideband_progressJacques Germishuys2014-04-211-1/+1
| |
| * Check the return codes of remote callbacks.Jacques Germishuys2014-04-211-2/+1
| | | | | | | | The user may have requested that the operation be cancelled.
| * Fire progress callbacks also for pushes.Jacques Germishuys2014-04-201-1/+2
| | | | | | | | | | It's not very useful to only know that a pre-receive hook has declined a push, you probably want to know why.
* | transports: allow the creds callback to say it doesn't existCarlos Martín Nieto2014-04-221-0/+3
| | | | | | | | | | | | | | | | 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.
* | remote: provide read access to the callback structureCarlos Martín Nieto2014-04-221-0/+11
|/ | | | | This should make it easier for bindings to dynamically override their own callbacks.
* remote: rename inmemory to anonymous and swap url and fetch orderCarlos Martín Nieto2014-04-011-7/+7
| | | | | | | | | | 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.
* Added function-based initializers for every options struct.Matthew Bowen2014-03-051-0/+13
| | | | The basic structure of each function is courtesy of arrbee.
* Correct default reflog message for git_remote_fetchBen Straub2014-02-061-1/+2
|
* Fix terrible indentationBen Straub2014-02-061-1/+1
|
* Add reflog parameters to remote apisBen Straub2014-02-041-2/+14
| | | Also added a test for git_remote_fetch.
* Make sure git_remote_dup copies a remote's refspecs correctly.Arthur Schreiber2014-01-261-1/+1
|
* Add some missing const declarations.Arthur Schreiber2014-01-261-6/+6
|
* Add `git_remote_dup`.Arthur Schreiber2014-01-141-0/+12
|
* Merge pull request #1951 from victorgp/create-remote-plus-fetchVicent Martí2013-11-141-0/+19
|\ | | | | Allowing create remotes with custom fetch spec
| * fixing typoVictor Garcia2013-11-081-1/+1
| |
| * splitting funcionality in two methods to avoid ambiguity with NULLVictor Garcia2013-11-081-1/+17
| |
| * adding doc for new param and test to check fetch spec is correctly addedVictor Garcia2013-11-071-1/+3
| |
| * allowing create remote with custom fetch specVictor Garcia2013-11-071-1/+2
| |
* | remote: make _ls return the list directlyCarlos Martín Nieto2013-11-111-6/+7
| | | | | | | | | | | | | | | | | | | | | | 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.
* | remote: don't allow such direct access to the refspecsCarlos Martín Nieto2013-11-101-10/+27
| | | | | | | | | | | | 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.