summaryrefslogtreecommitdiff
path: root/tests/online/fetch.c
Commit message (Collapse)AuthorAgeFilesLines
* proxy: ask the user for credentials if necessaryCarlos Martín Nieto2016-04-191-6/+6
|
* Tell the git_transport about the custom_headersMatt Burke2015-09-081-6/+6
|
* remote: move the tagopt setting to the fetch optionsCarlos Martín Nieto2015-05-131-2/+2
| | | | | This is another option which we should not be keeping in the remote, but is specific to each particular operation.
* remote: move the update_fetchhead setting to the optionsCarlos Martín Nieto2015-05-131-1/+1
| | | | | | 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.
* Remove the callbacks struct from the remoteCarlos Martín Nieto2015-05-131-30/+24
| | | | | | | | | | | | | | 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.
* Put back the number of expected references to 6 from the test repoCarlos Martín Nieto2015-03-131-3/+3
| | | | | | | This was but down to 5 when GitHub made a change to their server which made them stop honouring the include-tag request. This has recently been corrected, so we can bring it back up to six.
* Remove the signature from ref-modifying functionsCarlos Martín Nieto2015-03-031-4/+4
| | | | | | | | | | 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.
* fetch: clear the connection data on closecmn/fetch-twiceCarlos Martín Nieto2014-11-191-0/+11
| | | | | | | | | | | When we fetch twice with the same remote object, we did not properly clear the connection flags, so we would leak state from the last connection. This can cause the second fetch with the same remote object to fail if using a HTTP URL where the server redirects to HTTPS, as the second fetch would see `use_ssl` set and think the initial connection wanted to downgrade the connection.
* 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.
* remote: allow overriding the refspecs for download and fetchCarlos Martín Nieto2014-09-301-5/+5
| | | | | | | 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.
* remote: expose the remote's symref mappingsCarlos Martín Nieto2014-05-211-0/+18
| | | | | Add a symref_target field to git_remote_head to expose the symref mappings to the user.
* Added a test, that fails for #2133Matthias Bartelmeß2014-03-031-0/+15
|
* Add reflog parameters to remote apisBen Straub2014-02-041-2/+2
| | | Also added a test for git_remote_fetch.
* Updated fetch.c test to pass.Marek Šuppa2013-12-311-3/+3
| | | I am not sure why there was 6 in the first place.
* Remove converting user error to GIT_EUSERRussell Belfer2013-12-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the behavior of callbacks so that the callback error code is not converted into GIT_EUSER and instead we propagate the return value through to the caller. Instead of using the giterr_capture and giterr_restore functions, we now rely on all functions to pass back the return value from a callback. To avoid having a return value with no error message, the user can call the public giterr_set_str or some such function to set an error message. There is a new helper 'giterr_set_callback' that functions can invoke after making a callback which ensures that some error message was set in case the callback did not set one. In places where the sign of the callback return value is meaningful (e.g. positive to skip, negative to abort), only the negative values are returned back to the caller, obviously, since the other values allow for continuing the loop. The hardest parts of this were in the checkout code where positive return values were overloaded as meaningful values for checkout. I fixed this by adding an output parameter to many of the internal checkout functions and removing the overload. This added some code, but it is probably a better implementation. There is some funkiness in the network code where user provided callbacks could be returning a positive or a negative value and we want to rely on that to cancel the loop. There are still a couple places where an user error might get turned into GIT_EUSER there, I think, though none exercised by the tests.
* Rename tests-clar to testsBen Straub2013-11-141-0/+171