| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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.
|
|\ |
|
| |\
| | |
| | | |
When auto follow tags, FETCH_HEAD should list only newly followed tags
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
If we do not have a HEAD ref in the heads, we already know there is no
default branch. Return immedately.
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
A symref inside the namespace gets renamed, we should make it point to
the target's new name.
This is for the origin/HEAD -> origin/master type of situations.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
We must make sure that the name pointer remains valid, so make sure to
allocate the new one before freeing the old one and swap them so the
user never sees an invalid pointer.
|
|
|
|
|
|
|
|
| |
We don't allow renames of anonymous remotes, so there's no need to
handle them.
A remote is always associated with a repository, so there's no need to
check for that.
|
|
|
|
|
|
|
|
| |
Tighten up which references we consider for renaming so we don't try to
rename unrelated ones and end up with unexplained references.
If there is a reference on the target namespace, git overwrites it, so
let's do the same.
|
|\
| |
| |
| |
| | |
arthurschreiber/arthur/set-error-when-no-remote-found
Remote: Set an error when a remote cannot be found.
|
| |
| |
| |
| |
| |
| |
| | |
Inside `git_remote_load`, the calls to `get_optional_config` use
`giterr_clear` to unset any errors that are set due to missing config
keys. If neither a fetch nor a push url config was found for a remote,
we should set an error again.
|
|/
|
|
|
|
| |
When removing the remote-tracking branches, build up the list and remove
in two steps, working around an issue with the iterator. Removing while
we're iterating over the refs can cause us to miss references.
|
|
|
|
|
| |
If the remote supports the symref protocol extension, then we return
that, otherwise we guess with git's rules.
|
|\
| |
| | |
Remote deletion
|
| |
| |
| |
| |
| | |
When we delete a remote, we also need to go through its fetch refspecs
and remove the references they create locally.
|
| |
| |
| |
| | |
This should make it more readable and allocate a bunch fewer strings.
|
| | |
|
|\ \
| | |
| | | |
Configuration snapshotting
|
| | |
| | |
| | |
| | |
| | |
| | | |
Accessing the repository's config and immediately taking a snapshot of
it is a common operation, so let's provide a convenience function for
it.
|
| | |
| | |
| | |
| | |
| | | |
This way we can assume we have a consistent view of the config situation
when we're looking up remote, branch, pack-objects, etc.
|
| | |
| | |
| | |
| | |
| | | |
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.
|
| |/ |
|
|/
|
|
|
| |
This should make it easier for bindings to dynamically override their
own callbacks.
|
|\
| |
| | |
Improve submodule cache management
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes `git_submodule_sync` to correctly update the remote URL
of the default branch of the submodule along with the URL in the
parent repository config (i.e. match core Git's behavior).
Also move some useful helper logic from the submodule code into
a shared config API `git_config__update_entry` that can either set
or delete an entry with constraints like not overwriting or not
creating a new entry. I used that helper to update a couple other
places in the code.
|
|/
|
|
|
|
|
|
|
|
|
| |
When the current branch is unborn, git will still mark the current
branch's upstream for-merge if there is an upstream configuration. The
only non-constrived case is cloning from an empty repository which then
gains history. origin's master should be marked for-merge.
In order to do this, we cannot use the high-level wrappers that expect a
reference, as we may not have one. Move over to the internal ones that
expect a reference name, which we do have.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
git_remote_fetch. Moved error check to statement following git_remote_disconnect so that the disconnect happens regardless of the result of the download call.
|
| |
|
|
|
| |
Also added a test for git_remote_fetch.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Any well-behaved program should write a descriptive message to the
reflog whenever it updates a reference. Let's make this more prominent
by removing the version without the reflog parameters.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This renames git_vector_free_all to the better git_vector_free_deep
and also contains a couple of memory leak fixes based on valgrind
checks. The fixes are specifically: failure to free global dir
path variables when not compiled with threading on and failure to
free filters from the filter registry that had not be initialized
fully.
|
| |
|