summaryrefslogtreecommitdiff
path: root/tests/clone/nonetwork.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #3115 from libgit2/cmn/clone-submoduleEdward Thomson2015-05-131-0/+55
|\ | | | | submodule: add test initialising and cloning a repo
| * submodule: add test initialising and cloning a repocmn/clone-submoduleCarlos Martín Nieto2015-05-121-0/+55
| | | | | | | | | | | | | | | | We have a few tests checking each step, but we do not yet have a test which tests the documented workflow for creating a submodule, namely `setup_add` followed by cloning into it, followed by `add_finalize`. Add such a test to protect against regressions in this workflow.
* | Remove the callbacks struct from the remoteCarlos Martín Nieto2015-05-131-3/+3
|/ | | | | | | | | | | | | | 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.
* clone: add failing test for local transport with a tagCarlos Martín Nieto2015-03-171-0/+45
| | | | | | | When there is a tag, we must make sure that we get all referenced objects from this tag as well. This failing test shows that e.g. when there is a tagged tree, we insert the top tree but do not descend, thus causing the clone to have broken links.
* config: borrow refcounted referencescmn/config-borrow-entryCarlos Martín Nieto2015-03-031-1/+1
| | | | | | | | | | | | | | | 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.
* repository: remove log message override for switching the active branchCarlos Martín Nieto2015-03-031-1/+1
| | | | | | We want to use the "checkout: moving from ..." message in order to let git know when a change of branch has happened. Make the convenience functions for this goal write this message.
* Remove the signature from ref-modifying functionsCarlos Martín Nieto2015-03-031-11/+1
| | | | | | | | | | 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.
* clone: drop now unnecessary SAFE_CREATEEdward Thomson2015-02-271-1/+1
|
* remote: rename _load() to _lookup()cmn/remote-lookupCarlos Martín Nieto2014-11-081-2/+2
| | | | This brings it in line with the rest of the lookup functions.
* Merge pull request #2455 from ethomson/equal_oidVicent Marti2014-07-021-1/+1
|\ | | | | Introduce `cl_assert_equal_oid`
| * Introduce cl_assert_equal_oidEdward Thomson2014-07-011-1/+1
| |
* | clone: remote git_clone_into{,_local} from the public APIcmn/clone-custom-repoCarlos Martín Nieto2014-07-021-17/+0
| | | | | | | | | | | | 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-3/+16
|/ | | | | 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: write tests for cloning from an empty repoCarlos Martín Nieto2014-04-021-0/+34
| | | | | | | | Cloning from an empty repo must set master's upstream to origin's master, even if neither of them exist. Fetching from a non-empty origin must then mark the master branch for-merge. This currently fails.
* git_checkout_opts -> git_checkout_optionsBen Straub2014-03-061-1/+1
|
* Enhance testing of signature parametersBen Straub2014-01-301-4/+10
|
* Augment clone API with reflog parametersBen Straub2014-01-301-0/+44
|
* Add reflog params to set-head callsBen Straub2014-01-301-1/+1
|
* Update clone doc and tests for callback return valRussell Belfer2013-12-111-1/+56
| | | | | | | Clone callbacks can return non-zero values to cancel the clone. This adds some tests to verify that this actually works and updates the documentation to be clearer that this can happen and that the return value will be propagated back by the clone function.
* Rename tests-clar to testsBen Straub2013-11-141-0/+179