src/remote.h


Log

Author Commit Date CI Message
Patrick Steinhardt 0c7f49dd 2017-06-30T13:39:01 Make sure to always include "common.h" first Next to including several files, our "common.h" header also declares various macros which are then used throughout the project. As such, we have to make sure to always include this file first in all implementation files. Otherwise, we might encounter problems or even silent behavioural differences due to macros or defines not being defined as they should be. So in fact, our header and implementation files should make sure to always include "common.h" first. This commit does so by establishing a common include pattern. Header files inside of "src" will now always include "common.h" as its first other file, separated by a newline from all the other includes to make it stand out as special. There are two cases for the implementation files. If they do have a matching header file, they will always include this one first, leading to "common.h" being transitively included as first file. If they do not have a matching header file, they instead include "common.h" as first file themselves. This fixes the outlined problems and will become our standard practice for header and source files inside of the "src/" from now on.
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
Matt Burke ac9b5127 2015-09-04T09:20:45 Pull extra_http_headers from the git_remote
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 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.
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.
Linquize 5f473947 2014-09-22T23:17:35 remote: prune refs when fetching
Carlos Martín Nieto c5837cad 2014-07-04T09:03:33 remote: implement opportunistic remote-tracking branch updates 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.
Carlos Martín Nieto 2cdd5c57 2014-07-03T07:56:31 remote: store passive refspecs 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.
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.
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
Russell Belfer 8f2a3d62 2013-11-18T12:14:50 Fix warnings
Carlos Martín Nieto af613ecd 2013-10-28T23:30:45 remote: store dwimed refspecs separately This allows us to add e.g. "HEAD" as a refspec when none are given without overwriting the user's data.
Carlos Martín Nieto e3c131c5 2013-09-16T05:02:25 remote: move the credentials callback to the struct 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.
Russell Belfer 114f5a6c 2013-06-10T10:10:39 Reorganize diff and add basic diff driver 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.
Carlos Martín Nieto 1be680c4 2013-04-20T19:13:47 refspec: unify the string and parsed data 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.
Carlos Martín Nieto 4330ab26 2013-04-20T04:43:28 remote: handle multiple refspecs 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.
Edward Thomson 359fc2d2 2013-01-08T17:07:25 update copyrights
Ben Straub c07b52df 2013-01-02T12:48:17 Remove `inmem` flag, use NULL name instead
Ben Straub 874dcb25 2012-12-20T11:49:05 Remote: deprecate dangling, prevent saving in-memory
Ben Straub 59bccf33 2012-12-10T11:11:01 Add a payload param to git_cred_acquire_cb Fixes #1128.
Philip Kelley 613d5eb9 2012-11-28T11:42:37 Push! By schu, phkelley, and congyiwu, et al
Ben Straub f4a62c30 2012-11-27T14:13:03 Typedef enums.
Edward Thomson b0f6e45d 2012-11-01T15:47:18 create FETCH_HEAD specially instead of as a ref file
Philip Kelley 091361f5 2012-11-06T08:52:03 Basic authentication for http and winhttp
Philip Kelley 41fb1ca0 2012-10-29T13:41:14 Reorganize transport architecture (squashed 3)
Ben Straub 7d222e13 2012-10-24T13:29:14 Network progress: rename things git_indexer_stats and friends -> git_transfer_progress* Also made git_transfer_progress members more sanely named.
Ben Straub 3028be07 2012-10-16T13:10:27 Add git_indexer_stats field to git_remote Also removing all the *stats parameters from external APIs that don't need them anymore.
nulltoken 096d9e94 2012-10-07T21:00:46 remote: use constants for well-known names
Carlos Martín Nieto 3230a44f 2012-09-30T10:56:06 remote: support downloading all tags Also honor remote.$name.tagopt = --tags.
Carlos Martín Nieto 24f2f94e 2012-09-15T08:07:24 fetch: use the include-tag capability This tells the remote to send us any tags that point to objects that we are downloading.
Michael Schubert 7e9f78b5 2012-08-04T15:22:38 remote: add missing include git2/remote.h Otherwise we get an incomplete type error, since git_remote_callbacks isn't declared yet.
Vicent Martí 60d5cc57 2012-07-27T09:52:44 Merge pull request #834 from carlosmn/network-callbacks Add a struct for network callbacks
Sascha Cunz eff5b499 2012-07-25T02:34:12 Remotes: Use correct url in git_remote_connect
Sascha Cunz 3ed4b501 2012-07-25T01:32:31 Remotes: Load/Save for fetch.foo.pushurl
Carlos Martín Nieto b3aaa7a7 2012-07-21T17:52:51 Add a struct for network callbacks Currently only update_tips is used, but it prepares the way for progress output during download.
Carlos Martín Nieto 250b95b2 2012-05-26T21:17:08 ssl: allow skipping the server certificate check Sometimes it's useful not to perform the check. Allow it to be configurable.
schu 5e0de328 2012-02-13T17:10:24 Update Copyright header Signed-off-by: schu <schu-github@schulog.org>
Vicent Marti d88d4311 2011-11-28T08:40:40 remote: Cleanup the remotes code - Hide the remaining transports code - Drop `git_headarray`, switch to using a callback to list refs. Makes the code cleaner.
Carlos Martín Nieto 03e4833b 2011-10-05T20:17:21 remote: bitfield should be unsigned Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Vicent Marti bb742ede 2011-09-19T01:54:32 Cleanup legal data 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.
Carlos Martín Nieto 48a65a07 2011-08-04T22:42:58 Only wait for pack if we need it 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>
Carlos Martín Nieto e1d88030 2011-08-04T13:07:55 Don't expose the fetch code to the user 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>
Carlos Martín Nieto 44daec42 2011-08-03T22:03:57 Bind the configuration and remotes to a repository 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>
Carlos Martín Nieto 0e20ba60 2011-07-30T18:56:20 Add a generic send_wants Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto b4c90630 2011-07-30T22:29:00 Implement sending haves Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 9ba49bb5 2011-06-23T03:04:23 Add git_remote_connect and git_remote_ls 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>
Carlos Martín Nieto 9c82357b 2011-06-17T18:13:14 Add a remotes API Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>