summaryrefslogtreecommitdiff
path: root/tests/remote
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #6101 from mkhl/fix/instead-ofEdward Thomson2021-12-231-14/+96
|\ | | | | remotes: fix insteadOf/pushInsteadOf handling
| * update remote/insteadof testsMartin Kühl2021-11-111-14/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | we want to test: - an anonymous repo (a url) - a named repo with a url - a named repo with a url and pushurl and for each of these matching configuration: - only insteadOf - only pushInsteadOf - both insteadOf and pushInsteadOf this change adds test cases for all of these combinations.
* | tests: declare functions statically where appropriateEdward Thomson2021-11-112-4/+4
|/
* str: introduce `git_str` for internal, `git_buf` is externalethomson/gitstrEdward Thomson2021-10-171-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | libgit2 has two distinct requirements that were previously solved by `git_buf`. We require: 1. A general purpose string class that provides a number of utility APIs for manipulating data (eg, concatenating, truncating, etc). 2. A structure that we can use to return strings to callers that they can take ownership of. By using a single class (`git_buf`) for both of these purposes, we have confused the API to the point that refactorings are difficult and reasoning about correctness is also difficult. Move the utility class `git_buf` to be called `git_str`: this represents its general purpose, as an internal string buffer class. The name also is an homage to Junio Hamano ("gitstr"). The public API remains `git_buf`, and has a much smaller footprint. It is generally only used as an "out" param with strict requirements that follow the documentation. (Exceptions exist for some legacy APIs to avoid breaking callers unnecessarily.) Utility functions exist to convert a user-specified `git_buf` to a `git_str` so that we can call internal functions, then converting it back again.
* Merge branch 'sathieu/patch-1' into mainEdward Thomson2021-09-201-0/+9
|\
| * httpproxy: move empty string test above configEdward Thomson2021-09-201-4/+9
| | | | | | | | | | The configuration change will override the environment variable, so the environment variable check needs to come first.
| * Add test to ensure empty proxy env behaves like unset envMathieu Parent2021-09-141-0/+4
| | | | | | Signed-off-by: Mathieu Parent <math.parent@gmail.com>
* | Update formatting.Laurence McGlashan2021-09-161-3/+3
| |
* | Allow proxy options when connecting with a detached remote.Laurence McGlashan2021-09-161-1/+41
|/
* remote: refactor proxy detectionEdward Thomson2021-09-012-40/+139
| | | | | | | | | | Update the proxy detection for a remote. 1. Honor `http.<url>.proxy` syntax for a remote's direct URL and parent URLs. 2. Honor an empty configuration URL to override a proxy configuration. Add tests to ensure that configuration specificity is honored.
* Add NO_PROXY env supportMathieu Parent2021-09-011-0/+40
| | | | | | Item 2 of 3 from #4164 Signed-off-by: Mathieu Parent <math.parent@gmail.com>
* tests: change comments to c89 stylePeter Pettersson2021-08-291-7/+7
|
* skip descendant check if remote ref not foundAlex Good2021-08-051-19/+4
|
* Fix memory sanitizer failures in testsAlex Good2021-06-301-15/+18
|
* Respect the force flag on refspecs in git_remote_fetchAlex Good2021-06-111-0/+181
|
* strarray: we should `dispose` instead of `free`Edward Thomson2020-06-012-13/+13
| | | | | | We _dispose_ the contents of objects; we _free_ objects (and their contents). Update `git_strarray_free` to be `git_strarray_dispose`. `git_strarray_free` remains as a deprecated proxy function.
* tests: remote: add test suite to test listing remotesJordan Wallet2019-07-211-0/+43
| | | | | | | | There was a bug when calling `git_remote_list` that caused us to not re-read modified configurations when using `git_config_iterator`. This bug also impacted `git_remote_list`, which thus failed to provide an up-to-date list of remotes. Add a test suite remote::list with a single test that verifies we do the right thing.
* tests: unwarranted NULL-ificationEtienne Samson2018-11-021-1/+0
|
* tests: remote/create: remove macro and unroll testsEtienne Samson2018-11-021-29/+63
|
* remote: add a flag to prevent generation of the default fetchspecEtienne Samson2018-11-021-5/+1
|
* remote: add a creation flag for ignoring url.insteadOfEtienne Samson2018-11-021-0/+17
|
* remote: provide a generic API for creating remotesEtienne Samson2018-11-021-0/+152
| | | | This supersedes the functionality of remote_create_with_fetchspec, remote_create_anonymous and remote_create_detached.
* tests: count config section helper already existsEtienne Samson2018-11-021-29/+12
|
* tests: git_remote_create_detachedEtienne Samson2018-11-021-0/+30
|
* tests: check what happens with the remote. section countsEtienne Samson2018-11-021-0/+29
|
* tests: git_remote_create_anonymousEtienne Samson2018-11-021-0/+21
|
* tests: git_remote_create_with_fetchspecEtienne Samson2018-11-021-0/+23
|
* tests: consolidate all remote creation tests in one test suiteEtienne Samson2018-11-021-3/+70
|
* tests: rename remote creation test suiteEtienne Samson2018-11-021-0/+37
|
* remote: test insteadOf for anonymous remotesPatrick Steinhardt2015-05-311-0/+12
|
* remote: apply insteadOf configuration.Patrick Steinhardt2015-05-311-0/+60
A remote's URLs are now modified according to the url.*.insteadOf and url.*.pushInsteadOf configurations. This allows a user to replace URL prefixes by setting the corresponding keys. E.g. "url.foo.insteadOf = bar" would replace the prefix "bar" with the new prefix "foo".