| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Instead we provide git_remote_upload() and git_remote_update_tips() in
order to have a parallel API for fetching and pushing.
|
|
|
|
|
|
|
|
|
|
| |
This makes them show up in the reference, even if the text itself isn't
the most descriptive.
These have been found with
grep -Przon '\n\ntypedef struct.*?\{' -- include
grep -Przon '\n\ntypedef enum.*?\{' -- include
|
| |
|
|
|
|
|
| |
On disconnect we simply ask the transport to close the connection, we do
not free it.
|
|
|
|
|
| |
Make it clear that this is not the ls-remote command but a way to access
the data we have and how long it's kept around.
|
|
|
|
|
| |
If the user does not pass any refspecs to push, try to use those
configured via the configuration or via add_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.
|
|
|
|
| |
This brings it in line with the rest of the lookup functions.
|
|\
| |
| | |
remote: accept a repo and name for renaming
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
| |
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.
|
|\
| |
| | |
remote: accept a repository and remote name for deletion
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|/
|
|
|
|
|
| |
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.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This option make it easy to ignore anything about the server we're
connecting to, which is bad security practice. This was necessary as we
didn't use to expose detailed information about the certificate, but now
that we do, we should get rid of this.
If the user wants to ignore everything, they can still provide a
callback which ignores all the information passed.
|
|/
|
|
|
|
|
|
|
| |
If the certificate validation fails (or always in the case of ssh),
let the user decide whether to allow the connection.
The data structure passed to the user is the native certificate
information from the underlying implementation, namely OpenSSL or
WinHTTP.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Move the transport registration mechanisms into a new header under
'sys/' because this is advanced stuff.
* Remove the 'priority' argument from the registration as it adds
unnecessary complexity. (Since transports cannot decline to operate,
only the highest priority transport is ever executed.) Users who
require per-priority transports can implement that in their custom
transport themselves.
* Simplify registration further by taking a scheme (eg "http") instead
of a prefix (eg "http://").
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
This was a bad idea. Don't free except in the free function.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
If the remote supports the symref protocol extension, then we return
that, otherwise we guess with git's rules.
|
|\
| |
| | |
Remote deletion
|
| | |
|
|/
|
|
|
| |
There were a couple of "init_opts()" functions a few more cases
of structure initialization that I somehow missed.
|
|\
| |
| | |
Fire progress and update tips callbacks also for pushes.
|
| | |
|
| | |
|
| |
| |
| |
| | |
The user may have requested that the operation be cancelled.
|
| |
| |
| |
| |
| | |
It's not very useful to only know that a pre-receive hook has declined
a push, you probably want to know why.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Allow the credentials callback to return GIT_PASSTHROUGH to make the
transports code behave as though none was set.
This should make it easier for bindings to behave closer to the C code
when there is no credentials callback set at their level.
|
|/
|
|
|
| |
This should make it easier for bindings to dynamically override their
own callbacks.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
The basic structure of each function is courtesy of arrbee.
|
| |
|
| |
|
|
|
| |
Also added a test for git_remote_fetch.
|
| |
|
| |
|
| |
|
|\
| |
| | |
Allowing create remotes with custom fetch spec
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The callback-based method of listing remote references dates back to the
beginning of the network code's lifetime, when we didn't know any
better.
We need to keep the list around for update_tips() after disconnect() so
let's make use of this to simply give the user a pointer to the array so
they can write straightforward code instead of having to go through a
callback.
|
| |
| |
| |
| |
| |
| | |
Removing arbitrary refspecs makes things more complex to reason
about. Instead, let the user set the fetch and push refspec list to
whatever they want it to be.
|