tests/network/remote/remotes.c


Log

Author Commit Date CI Message
cthomas fc6f044e 2015-04-21T20:02:24 Fix for Issue #3023 tests fail with no network Moved offending tests from network to online so they will get skipped when there is a lack of network connectivity: -test_online_remotes__single_branch -test_online_remotes__restricted_refspecs
Carlos Martín Nieto 9a97f49e 2014-12-21T15:31:03 config: borrow refcounted references This changes the get_entry() method to return a refcounted version of the config entry, which you have to free when you're done. This allows us to avoid freeing the memory in which the entry is stored on a refresh, which may happen at any time for a live config. For this reason, get_string() has been forbidden on live configs and a new function get_string_buf() has been added, which stores the string in a git_buf which the user then owns. The functions which parse the string value takea advantage of the borrowing to parse safely and then release the entry.
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.
Edward Thomson 02bc5233 2014-11-08T17:05:13 Merge pull request #2698 from libgit2/cmn/fetchhead-refactor Refactor fetchhead
Carlos Martín Nieto 64fdd86d 2014-11-08T20:21:14 remote: don't check for upstream on an anonymous remote If the remote is anonymous, then we cannot check for any configuration, as there is no name. Check for this before we try to use the name, which may be a NULL pointer. This fixes #2697.
Carlos Martín Nieto 209425ce 2014-11-08T13:25:51 remote: rename _load() to _lookup() This brings it in line with the rest of the lookup functions.
Carlos Martín Nieto 0f838d27 2014-11-02T20:03:23 remote: add a failing test for checking the current branch's upstream When we update FETCH_HEAD we check whether the remote is the current branch's upstream remote. The code does not check whether the current refspec is relevant for this reference but always tries to perform the reverse transformation, which causes it to error out if the refspec doesn't match the reference. Thanks to Pierre-Olivier Latour for the reproduction recipe.
Carlos Martín Nieto 0862f617 2014-10-24T12:19:13 remote: delete git_remote_supported_url() 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.
Carlos Martín Nieto 25abbc27 2014-09-17T03:19:40 Clean up some leaks in the test suite
Vicent Marti 31e752b6 2014-09-09T12:52:36 Merge pull request #2511 from libgit2/cmn/remote-default-restrict Restrict which refs can be the default branch
Carlos Martín Nieto 15c30b72 2014-09-02T13:23:54 clone: handle overly restrictive refspecs When the fetch refspec does not include the remote's default branch, it indicates an error in user expectations or programmer error. Error out in that case. This lets us get rid of the dummy refspec which can never work as its zeroed out. In the cases where we did not find a default branch, we set HEAD detached immediately, which lets us refactor the "normal" path, removing `found_branch`.
Carlos Martín Nieto 538f9081 2014-09-01T16:35:10 remote: add test for single-branch clone When cloning, we may be asking for a particular branch or subset of branches. Make sure we test for that.
Carlos Martín Nieto 05ac7051 2014-08-31T21:53:42 remote: test for supported URLs in a single place Instead of using ifdefs to run the tests, use them to set when we expect to support a particular scheme and always have the tests in the code.
Carlos Martín Nieto ba67c075 2014-08-31T17:16:40 remote: get rid of git_remote_valid_url() 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.
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
Arthur Schreiber d723dbed 2014-05-30T19:26:49 Remote: Set an error when a remote cannot be found. Inside `git_remote_load`, the calls to `get_optional_config` use `giterr_clear` to unset any errors that are set due to missing config keys. If neither a fetch nor a push url config was found for a remote, we should set an error again.
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.
Edward Thomson 96f12e70 2014-01-29T12:50:42 Don't strcmp a git_buf, strcmp its char *
Carlos Martín Nieto bf522e08 2014-01-26T16:59:36 refspec: move to git_buf for outputting strings
Arthur Schreiber 991b2840 2014-01-26T19:35:02 Make sure git_remote_dup copies a remote's refspecs correctly.
Arthur Schreiber 40ef47dd 2014-01-14T21:03:01 Add `git_remote_dup`.
Ben Straub 17820381 2013-11-14T14:05:52 Rename tests-clar to tests