summaryrefslogtreecommitdiff
path: root/tests/network
Commit message (Collapse)AuthorAgeFilesLines
* git_remote_rename: propogate GIT_ENOTFOUNDEdward Thomson2014-11-031-0/+9
|
* remote: fix tagopt testCarlos Martín Nieto2014-11-021-7/+7
| | | | | | | | | | | 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.
* tests: fix leakCarlos Martín Nieto2014-10-271-0/+1
|
* Fix test repo dir not deleted after runningLinquize2014-10-271-1/+1
|
* Merge pull request #2646 from libgit2/cmn/remote-renameEdward Thomson2014-10-241-43/+21
|\ | | | | remote: accept a repo and name for renaming
| * remote: accept a repo and name for renamingcmn/remote-renameCarlos Martín Nieto2014-10-241-43/+21
| | | | | | | | | | | | | | | | | | | | Remote objects are not meant to be changed from under the user. We did this in rename, but only the name and left the refspecs, such that a save would save the wrong refspecs (and a fetch and anything else would use the wrong refspecs). Instead, let's simply take a name and not change any loaded remote from under the user.
* | remote: delete git_remote_supported_url()cmn/remove-supported-urlCarlos Martín Nieto2014-10-241-20/+0
|/ | | | | | | 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.
* Merge pull request #2593 from libgit2/cmn/remote-delete-nameEdward Thomson2014-10-101-18/+3
|\ | | | | remote: accept a repository and remote name for deletion
| * remote: accept a repository and remote name for deletioncmn/remote-delete-nameCarlos Martín Nieto2014-09-301-18/+3
| | | | | | | | | | | | | | | | We don't need the remote loaded, and the function extracted both of these from the git_remote in order to do its work, so let's remote a step and not ask for the loaded remote at all. This fixes #2390.
* | Fix test buildCarlos Martín Nieto2014-10-101-2/+2
| | | | | | | | | | Some PRs have fallen out of sync with the changes in signatures, so we need to take a few extra parameters into account.
* | Merge pull request #2542 from linquize/fetch-headCarlos Martín Nieto2014-10-101-0/+34
|\ \ | | | | | | Do not error out when fetching from second remote
| * | Add network::fetchlocal multi remotes testLinquize2014-09-021-0/+34
| | |
* | | remote: implement opportunistic remote-tracking branch updatescmn/remote-fetch-refsCarlos Martín Nieto2014-09-301-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: use active refspec override in the testsCarlos Martín Nieto2014-09-301-25/+66
| | | | | | | | | | | | | | | This lets us test this bit as well as getting closer to what they were trying to do.
* | | remote: allow overriding the refspecs for download and fetchCarlos Martín Nieto2014-09-302-11/+11
| |/ |/| | | | | | | | | | | 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.
* | Clean up some leaks in the test suiteCarlos Martín Nieto2014-09-171-0/+1
| |
* | Merge pull request #2511 from libgit2/cmn/remote-default-restrictVicent Marti2014-09-092-0/+108
|\ \ | | | | | | Restrict which refs can be the default branch
| * | clone: handle overly restrictive refspecscmn/remote-default-restrictCarlos Martín Nieto2014-09-021-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
| * | clone: correct handling of an unborn HEADCarlos Martín Nieto2014-09-021-0/+15
| | | | | | | | | | | | | | | If the remote does not advertise HEAD, then it is unborn and we cannot checkout that branch. Handle it the same way as an empty repo.
| * | remote: add test for single-branch cloneCarlos Martín Nieto2014-09-021-0/+61
| | | | | | | | | | | | | | | When cloning, we may be asking for a particular branch or subset of branches. Make sure we test for that.
| * | remote: add tests for remote-branch edge casesCarlos Martín Nieto2014-09-021-0/+29
| | | | | | | | | | | | | | | | | | Add tests for the case when there are no branches on the remote and when HEAD is detached but has the id of a non-branch. In both of these cases, we should return ENOTFOUND.
| * | remote: assert what we want to happen when ther is no default branchCarlos Martín Nieto2014-08-291-0/+14
| |/ | | | | | | Assert what we already do, so as to notice changes.
* | remote: test for supported URLs in a single placeCarlos Martín Nieto2014-08-311-16/+9
| | | | | | | | | | 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.
* | remote: get rid of git_remote_valid_url()Carlos Martín Nieto2014-08-311-11/+16
|/ | | | | | | | | 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.
* Check if the refspec matches before transformingJacques Germishuys2014-08-171-5/+43
|
* git_remote_ls() should return an error if the transport is not availableJacques Germishuys2014-08-151-0/+11
|
* refspec: support asterisks in the middle of a patternCarlos Martín Nieto2014-07-041-0/+23
| | | | | | | | | | We used to assume a refspec would only have an asterisk in the middle of their respective pattern. This has not been a valid assumption for some time now with git. Instead of assuming where the asterisk is going to be, change the logic to treat each pattern as having two halves with a replacement bit in the middle, where the asterisk is.
* Merge pull request #2459 from libgit2/cmn/http-url-pathVicent Marti2014-07-031-0/+18
|\ | | | | netops: error out on url without a path
| * netops: error out on url without a pathcmn/http-url-pathCarlos Martín Nieto2014-07-031-0/+18
| | | | | | | | | | | | In order to connect to a remote server, we need to provide a path to the repository we're interested in. Consider the lack of path in the url an error.
* | clone: remote git_clone_into{,_local} from the public APIcmn/clone-custom-repoCarlos Martín Nieto2014-07-021-10/+25
| | | | | | | | | | | | As git_clone now has callbacks to configure the details of the repository and remote, remove the lower-level functions from the public API, as they lack some of the logic from git_clone proper.
* | Improvements to git_transport extensibilityPhilip Kelley2014-06-261-26/+4
|/ | | | | 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
* remote: don't free the remote on deletecmn/remote-rename-moreCarlos Martín Nieto2014-06-061-1/+1
| | | | This was a bad idea. Don't free except in the free function.
* remote: failing test for renaming with a symrefCarlos Martín Nieto2014-06-061-0/+48
|
* remote: return problem refspecs instead of using a callbackCarlos Martín Nieto2014-06-061-37/+53
| | | | | | There is no reason why we need to use a callback here. A string array fits better with the usage, as this is not an event and we don't need anything from the user.
* remote: failing test for renameCarlos Martín Nieto2014-06-061-0/+30
| | | | | When there is a reference in the target namespace, we should overwrite it. Instead it gets a different name under the current code.
* Remote: Set an error when a remote cannot be found.Arthur Schreiber2014-05-301-0/+9
| | | | | | | 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.
* remote: add api to guess the remote's default branchCarlos Martín Nieto2014-05-211-0/+50
| | | | | If the remote supports the symref protocol extension, then we return that, otherwise we guess with git's rules.
* Merge pull request #2354 from libgit2/cmn/clone-into-mirrorVicent Marti2014-05-191-0/+26
|\ | | | | Allow mirror-clone via `git_clone_into()`
| * clone: add failing test for a mirror-clone with clone_intoCarlos Martín Nieto2014-05-191-0/+26
| | | | | | | | | | Show a failure to perform a mirror-clone from a repository, both local and remote.
* | Merge pull request #2313 from libgit2/cmn/remote-deleteVicent Marti2014-05-161-0/+61
|\ \ | |/ |/| Remote deletion
| * remote: remove remote-tracking branches on deleteCarlos Martín Nieto2014-05-161-4/+8
| | | | | | | | | | When we delete a remote, we also need to go through its fetch refspecs and remove the references they create locally.
| * remote: Introduce git_remote_delete()nulltoken2014-04-301-0/+57
| |
* | netops: unit-test the cert host-name pattern matchingCarlos Martín Nieto2014-04-261-0/+13
|/ | | | | This kind of stuff should have unit tests, even if it's just to show what we expect to match successfully.
* remote: rename inmemory to anonymous and swap url and fetch orderCarlos Martín Nieto2014-04-013-9/+9
| | | | | | | | | | 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.
* Correct default reflog message for git_remote_fetchBen Straub2014-02-061-0/+28
|
* Add reflog parameters to remote apisBen Straub2014-02-042-8/+63
| | | Also added a test for git_remote_fetch.
* Don't strcmp a git_buf, strcmp its char *Edward Thomson2014-01-291-1/+1
|
* Merge pull request #2077 from libgit2/cmn/buf-outVicent Marti2014-01-271-14/+7
|\ | | | | Buff up returning strings
| * refspec: move to git_buf for outputting stringsCarlos Martín Nieto2014-01-271-14/+7
| |
* | MSVC doesn't like modern codeCarlos Martín Nieto2014-01-271-1/+2
|/