tests/network/remote/local.c


Log

Author Commit Date CI Message
Etienne Samson 39d18fe6 2019-07-31T08:37:10 smart: use push_glob instead of manual filtering The code worked under the assumption that anything under `refs/tags` are tag objects, and all the rest would be peelable to a commit. As it is completely valid to have tags to blobs under a non `refs/tags` ref, this would cause failures when trying to peel a tag to a commit. Fix the broken filtering by switching to `git_revwalk_push_glob`, which already handles this case.
Patrick Steinhardt ecf4f33a 2018-02-08T11:14:48 Convert usage of `git_buf_free` to new `git_buf_dispose`
Patrick Steinhardt bee423cc 2017-06-13T10:29:23 tests: network: add missing include for `git_repository_new` A newly added test uses the `git_repository_new` function without the corresponding header file being included. While this works due to the compiler deducing the correct function signature, we should obviously just include the function's declaration file.
Edward Thomson fe9a5dd3 2017-06-12T12:00:14 remote: ensure we can create an anon remote on inmemory repo Given a wholly in-memory repository, ensure that we can create an anonymous remote and perform actions on it.
Carlos Martín Nieto 07bd3e57 2015-05-07T12:57:56 proxy: ask the user for credentials if necessary
Matt Burke 4f2b6093 2015-09-08T13:53:41 Tell the git_transport about the custom_headers
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.
Carlos Martín Nieto 0bc3d56d 2015-05-07T16:12:36 tests: don't push to our resources A couple of tests use the wrong remote to push to. We did not notice up to now because the local push would copy individual objects, and those already existed, so it became a no-op. Once we made local push create the packfile, it became noticeable that there was a new packfile where it didn't belong.
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 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 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.
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 d524b2d3 2014-12-10T17:23:33 push: fold unpack_ok() into finish() The push cannot be successful if we sent a bad packfile. We should return an error in that case instead of storing it elsewhere.
Linquize d226fbf1 2014-12-07T22:42:06 Fix broken test suite on Windows
Carlos Martín Nieto 3fade40e 2014-11-23T21:29:35 remote: add test for pushing and deleting with the local transport
Carlos Martín Nieto f7fcb18f 2014-11-23T14:12:54 Plug leaks Valgrind is now clean except for libssl and libgcrypt.
Edward Thomson 8b5b814e 2014-11-17T20:10:58 Merge pull request #2671 from swisspol/remote_create_fix Fixed active_refspecs field not initialized on new git_remote objects
Edward Thomson 7f1b73b7 2014-11-17T17:03:55 Merge pull request #2693 from libgit2/cmn/push-refspec-refactor push: use the common refspec parser
Pierre-Olivier Latour d3cd7da5 2014-10-28T20:56:18 Fixed active_refspecs field not initialized on new git_remote objects When creating a new remote, contrary to loading one from disk, active_refspecs was not populated. This means that if using the new remote to push, git_push_update_tips() will be a no-op since it checks the refspecs passed during the push against the base ones i.e. active_refspecs. And therefore the local refs won't be created or updated after the push operation.
Carlos Martín Nieto aad638f3 2014-11-07T15:00:11 push: use the common refspec parser There is one well-known and well-tested parser which we should use, instead of implementing parsing a second time. The common parser is also augmented to copy the LHS into the RHS if the latter is empty. The expressions test had to change a bit, as we now catch a bad RHS of a refspec locally.
Pierre-Olivier Latour e284c451 2014-10-28T22:18:38 Changed GIT_REMOTE_DOWNLOAD_TAGS_ALL to behave like git 1.9.0
Carlos Martín Nieto ea8dedc9 2014-11-02T20:39:29 remote: fix tagopt test An anonymous remote wouldn't create remote-tracking branches, so testing we don't create them for TAGS_ALL is nonsensical. Furthermore, the name of the supposed remote-tracking branch was also not one which would have been created had it had a name. Give the remote a name and test that we only create the tags when we pass TAGS_ALL and that we do create the remote-branch branch when given TAGS_AUTO.
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 9c206a22 2014-06-06T15:24:53 remote: use active refspec override in the tests This lets us test this bit as well as getting closer to what they were trying to do.
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.
Jacques Germishuys dc8adda4 2014-08-15T22:51:19 git_remote_ls() should return an error if the transport is not available
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.
Ben Straub db55bb73 2014-02-06T11:18:10 Correct default reflog message for git_remote_fetch
Ben Straub c3ab1e5a 2014-02-04T20:38:13 Add reflog parameters to remote apis Also added a test for git_remote_fetch.
Carlos Martín Nieto 66d585c6 2014-01-27T04:58:23 MSVC doesn't like modern code
Graham Dennis c7015424 2014-01-18T08:54:19 Fix a compile warning.
Graham Dennis 194d077c 2014-01-18T08:43:29 Add test for pushing to a local file:// URL.
Ben Straub 17820381 2013-11-14T14:05:52 Rename tests-clar to tests