| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
If none of GIT_OPENSSL, GIT_WINHTTP or GIT_SECURE_TRANSPORT
is defined we should also be able to build the unit test.
|
|\
| |
| | |
Include custom HTTP headers
|
| |
| |
| |
| | |
Also, *some* custom headers actually are valid.
|
| | |
|
| |
| |
| |
| |
| | |
These provide bad X.509 certificates, which we should refuse to connect
to by default.
|
| | |
|
|/
|
|
|
|
| |
These are small pieces of data, so there is no advantage to allocating
them separately. Include the two ids inline in the struct we use to
check that the expected and actual ids match.
|
|
|
|
|
|
| |
Introduce `git__getenv` which is a UTF-8 aware `getenv` everywhere.
Make `cl_getenv` use this to keep consistent memory handling around
return values (free everywhere, as opposed to only some platforms).
|
| |
|
|
|
|
|
| |
We need to pass these options in order to have the credentials callback
set.
|
|\
| |
| | |
Support getting SSH keys from memory, pt. 2
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
| |
The code used to rely on the clone code calling the remote's save, which
does not happen anymore, meaning that the configuration settings the
remote expected were not being written to disk.
The run-time configuration was still being affected, so the right branch
was being cloned. The tests continued to pass as we did not check for
the configuration entires. Fix this by creating the remote with the
single-branch refspec we want and checking for its existence in the
configuration.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The base refspecs changing can be a cause of confusion as to what is the
current base refspec set and complicate saving the remote's
configuration.
Change `git_remote_add_{fetch,push}()` to update the configuration
instead of an instance.
This finally makes `git_remote_save()` a no-op, it will be removed in a
later commit.
|
|
|
|
|
| |
This is another option which we should not be keeping in the remote, but
is specific to each particular operation.
|
|
|
|
|
|
| |
While this will rarely be different from the default, having it in the
remote adds yet another setting it has to keep around and can affect its
behaviour. Move it to the options.
|
|
|
|
|
|
|
| |
Instead of having it set in a different place from every other callback,
put it the main structure. This removes some state from the remote and
makes it behave more like clone, where the constructors are passed via
the options.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
[WIP/RFC] push: report the update plan to the caller
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It can be useful for the caller to know which update commands will be
sent to the server before the packfile is pushed up. git does this via
the pre-push hook.
We don't have hooks, but as it adds introspection into what is
happening, we can add a callback which performs the same function.
|
|/
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
When we have an HTTP stream and have set the certificatre check
callback, we currently fail as we ask the unencrypted stream for its
certificate.
|
|
|
|
|
|
|
| |
This was but down to 5 when GitHub made a change to their server which
made them stop honouring the include-tag request.
This has recently been corrected, so we can bring it back up to six.
|
|
|
|
| |
We always use "update by push".
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Instead we provide git_remote_upload() and git_remote_update_tips() in
order to have a parallel API for fetching and pushing.
|
|
|
|
|
| |
Make it consistent between git_note_create() and git_note_remote() by
putting it after the repository.
|
|
|
|
|
|
|
|
|
|
|
| |
When we fetch twice with the same remote object, we did not properly
clear the connection flags, so we would leak state from the last
connection.
This can cause the second fetch with the same remote object to fail if
using a HTTP URL where the server redirects to HTTPS, as the second
fetch would see `use_ssl` set and think the initial connection wanted to
downgrade the connection.
|
|\
| |
| | |
Provide a convenience function `git_remote_push()`
|
| |
| |
| |
| |
| | |
If the user does not pass any refspecs to push, try to use those
configured via the configuration or via add_push().
|
| |
| |
| |
| |
| |
| |
| | |
We have the step-by-step method in the initialization function as we
want to remove references based on the list of references which are
already there, and we can use the convenience function for testing the
main push.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This function, similar in style to git_remote_fetch(), performs all the
steps required for a push, with a similar interface.
The remote callbacks struct has learnt about the push callbacks, letting
us set the callbacks a single time instead of setting some in the remote
and some in the push operation.
|
|\ \
| |/
|/| |
push: use the common refspec parser
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is one well-known and well-tested parser which we should use,
instead of implementing parsing a second time.
The common parser is also augmented to copy the LHS into the RHS if the
latter is empty.
The expressions test had to change a bit, as we now catch a bad RHS of a
refspec locally.
|
|/
|
|
| |
This brings it in line with the rest of the lookup functions.
|
|\
| |
| | |
Provide host name to certificate_check_cb
|
| |
| |
| |
| | |
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
| |
| |
| |
| | |
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
| |
| |
| |
| |
| | |
This lets us test this bit as well as getting closer to what they were
trying to do.
|
|/
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Skip it before we attempt to clone, as we would exit with -1 on systems
which do not have sshd running.
|
|
|
|
|
| |
The user may have the data hashed as MD5 or SHA-1, so we should provide
both types for consumption.
|
|
|
|
|
| |
Instead of using the libssh2 defines, provide our own, which eases usage
as we do not need to check whether libgit2 was built with libssh2 or not.
|
|
|
|
|
|
| |
Instead of spreading the data in function arguments, some of which
aren't used for ssh and having a struct only for ssh, use a struct for
both, using a common parent to pass to the callback.
|
|\ |
|
| |\
| | |
| | | |
When auto follow tags, FETCH_HEAD should list only newly followed tags
|
| | | |
|
| |\ \
| | | |
| | | | |
Skip SSH clone tests if libgit2 not built with GIT_SSH defined
|
| | |/ |
|