| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| | |
remotes: fix insteadOf/pushInsteadOf handling
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |\ |
|
| | |
| |
| |
| |
| | |
The configuration change will override the environment variable, so the
environment variable check needs to come first.
|
| | |
| |
| | |
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
|
| | | |
|
| |/ |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Item 2 of 3 from #4164
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This supersedes the functionality of remote_create_with_fetchspec, remote_create_anonymous and remote_create_detached.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|
|
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".
|