summaryrefslogtreecommitdiff
path: root/src/remote.h
Commit message (Collapse)AuthorAgeFilesLines
* remote: move the update_fetchhead setting to the optionsCarlos Martín Nieto2015-05-131-1/+0
| | | | | | 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.
* remote: move the transport ctor to the callbacksCarlos Martín Nieto2015-05-131-2/+0
| | | | | | | 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.
* Remove the callbacks struct from the remoteCarlos Martín Nieto2015-05-131-1/+0
| | | | | | | | | | | | | | 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.
* Merge pull request #2761 from libgit2/cmn/fetch-pruneEdward Thomson2014-12-301-0/+1
|\ | | | | Remote-tracking branch prunning
| * remote: prune refs when fetchingLinquize2014-12-141-0/+1
| |
* | remote: remove git_push from the public APIcmn/hide-pushCarlos Martín Nieto2014-12-301-0/+1
|/ | | | | Instead we provide git_remote_upload() and git_remote_update_tips() in order to have a parallel API for fetching and pushing.
* remote: implement opportunistic remote-tracking branch updatescmn/remote-fetch-refsCarlos Martín Nieto2014-09-301-0/+1
| | | | | | | | | | | When a list of refspecs is passed to fetch (what git would consider refspec passed on the command-line), we not only need to perform the updates described in that refspec, but also update the remote-tracking branch of the fetched remote heads according to the remote's configured refspecs. These "fetches" are not however to be written to FETCH_HEAD as they would be duplicate data, and it's not what the user asked for.
* remote: store passive refspecsCarlos Martín Nieto2014-09-301-0/+1
| | | | | | The configured/base fetch refspecs need to be taken into account in order to implement opportunistic remote-tracking branch updates. DWIM them and store them in the struct, but don't do anything with them yet.
* net: remove support for outright ignoring certificatesCarlos Martín Nieto2014-09-161-1/+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.
* Custom transport: minor cleanupsEdward Thomson2014-08-141-0/+1
| | | | | | | | | | | | * 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-0/+2
| | | | | 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
* Fix warningsRussell Belfer2013-11-181-2/+2
|
* remote: store dwimed refspecs separatelyCarlos Martín Nieto2013-11-011-0/+1
| | | | | This allows us to add e.g. "HEAD" as a refspec when none are given without overwriting the user's data.
* remote: move the credentials callback to the structCarlos Martín Nieto2013-10-021-2/+0
| | | | | Move this one as well, letting us have a single way of setting the callbacks for the remote, and removing fields from the clone options.
* Reorganize diff and add basic diff driverRussell Belfer2013-06-101-1/+1
| | | | | | | | | | | | | | | | | | This is a significant reorganization of the diff code to break it into a set of more clearly distinct files and to document the new organization. Hopefully this will make the diff code easier to understand and to extend. This adds a new `git_diff_driver` object that looks of diff driver information from the attributes and the config so that things like function content in diff headers can be provided. The full driver spec is not implemented in the commit - this is focused on the reorganization of the code and putting the driver hooks in place. This also removes a few #includes from src/repository.h that were overbroad, but as a result required extra #includes in a variety of places since including src/repository.h no longer results in pulling in the whole world.
* refspec: unify the string and parsed dataCarlos Martín Nieto2013-04-201-1/+0
| | | | | | | | It used to be separate as an attempt to make the querying easier, but it didn't work out that way, so put all the data together. Add git_refspec_string() as well to get the original string, which is now stored alongside the independent parts.
* remote: handle multiple refspecsCarlos Martín Nieto2013-04-201-2/+5
| | | | | | | | | | | | | A remote can have a multitude of refspecs. Up to now our git_remote's have supported a single one for each fetch and push out of simplicity to get something working. Let the remotes and internal code know about multiple remotes and get the tests passing with them. Instead of setting a refspec, the external users can clear all and add refspecs. This should be enough for most uses, though we're still missing a querying function.
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Add a payload param to git_cred_acquire_cbBen Straub2012-12-101-0/+1
| | | Fixes #1128.
* Push! By schu, phkelley, and congyiwu, et alPhilip Kelley2012-11-281-0/+1
|
* Typedef enums.Ben Straub2012-11-271-4/+4
|
* create FETCH_HEAD specially instead of as a ref fileEdward Thomson2012-11-111-1/+2
|
* Basic authentication for http and winhttpPhilip Kelley2012-11-061-0/+1
|
* Reorganize transport architecture (squashed 3)Philip Kelley2012-11-011-1/+1
|
* Network progress: rename thingsBen Straub2012-10-241-1/+1
| | | | | | | git_indexer_stats and friends -> git_transfer_progress* Also made git_transfer_progress members more sanely named.
* Add git_indexer_stats field to git_remoteBen Straub2012-10-191-0/+1
| | | | | Also removing all the *stats parameters from external APIs that don't need them anymore.
* remote: use constants for well-known namesnulltoken2012-10-071-0/+2
|
* remote: support downloading all tagsCarlos Martín Nieto2012-09-301-1/+1
| | | | Also honor remote.$name.tagopt = --tags.
* fetch: use the include-tag capabilityCarlos Martín Nieto2012-09-301-1/+2
| | | | | This tells the remote to send us any tags that point to objects that we are downloading.
* remote: add missing include git2/remote.hMichael Schubert2012-08-041-0/+2
| | | | | Otherwise we get an incomplete type error, since git_remote_callbacks isn't declared yet.
* Merge pull request #834 from carlosmn/network-callbacksVicent Martí2012-07-271-0/+1
|\ | | | | Add a struct for network callbacks
| * Add a struct for network callbacksCarlos Martín Nieto2012-07-211-0/+1
| | | | | | | | | | Currently only update_tips is used, but it prepares the way for progress output during download.
* | Remotes: Use correct url in git_remote_connectSascha Cunz2012-07-271-0/+2
| |
* | Remotes: Load/Save for fetch.foo.pushurlSascha Cunz2012-07-261-0/+1
|/
* ssl: allow skipping the server certificate checkCarlos Martín Nieto2012-05-261-1/+2
| | | | | Sometimes it's useful not to perform the check. Allow it to be configurable.
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* remote: Cleanup the remotes coderepo-ownershipVicent Marti2011-11-281-1/+1
| | | | | | - Hide the remaining transports code - Drop `git_headarray`, switch to using a callback to list refs. Makes the code cleaner.
* remote: bitfield should be unsignedCarlos Martín Nieto2011-10-121-1/+1
| | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Cleanup legal dataVicent Marti2011-09-191-0/+6
| | | | | | | | | | 1. The license header is technically not valid if it doesn't have a copyright signature. 2. The COPYING file has been updated with the different licenses used in the project. 3. The full GPLv2 header in each file annoys me.
* Only wait for pack if we need itCarlos Martín Nieto2011-08-181-0/+1
| | | | | | | Provide the git_remote_download function to instruct the library to downlad the packfile and let the user know the temporary location. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Don't expose the fetch code to the userCarlos Martín Nieto2011-08-181-0/+1
| | | | | | | | Move the generation of the want-list to be done from the negotiate function, and keep the filtered references inside the remote structure. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Bind the configuration and remotes to a repositoryCarlos Martín Nieto2011-08-181-0/+1
| | | | | | | | Configurations when taken from a repository and remotes should be identifiable as coming from a particular repository. This allows us to reduce the amount of variables that the user has to keep track of. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Implement sending havesCarlos Martín Nieto2011-08-181-3/+1
| | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Add a generic send_wantsCarlos Martín Nieto2011-08-181-0/+2
| | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Add git_remote_connect and git_remote_lsCarlos Martín Nieto2011-06-271-0/+2
| | | | | | | These allow you to implement git-ls-remote when given a reference name and a repository. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Add a remotes APICarlos Martín Nieto2011-06-261-0/+14
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>