summaryrefslogtreecommitdiff
path: root/src/remote.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * remote: use git_branch_upstream_remote()Carlos Martín Nieto2014-11-081-7/+8
| | | | | | | | | | This reduces the clutter somewhat and lets us see what we're asking about the reference.
* | remote: rename _load() to _lookup()cmn/remote-lookupCarlos Martín Nieto2014-11-081-4/+4
|/ | | | This brings it in line with the rest of the lookup functions.
* Merge pull request #2682 from libgit2/cmn/fetch-tags-refspecEdward Thomson2014-11-061-0/+1
|\ | | | | remote: check for the validity of the refspec when updating FETCH_HEAD
| * remote: check the relevance of the refspec when updating FETCH_HEADcmn/fetch-tags-refspecCarlos Martín Nieto2014-11-031-0/+1
| | | | | | | | | | | | Before trying to rtransform using the given refspec to figure out what the name of the upstream branch is on the remote, we must make sure that the target of the refspec applies to the current branch's upstream.
* | git_remote_rename: propogate GIT_ENOTFOUNDEdward Thomson2014-11-031-1/+1
| |
* | remote: unify the creation codecmn/remote-unifyCarlos Martín Nieto2014-11-021-21/+2
|/ | | | | | The create function with default refspec is the same as the one with a custom refspec, but it has the default refspec, so we can create the one on top of the other.
* Fixed potential crash with uninitialized variablesPierre-Olivier Latour2014-10-271-1/+1
|
* Remove unused warning on non-win32Edward Thomson2014-10-261-1/+1
|
* Clean up some memory leaksEdward Thomson2014-10-261-0/+1
|
* remote: accept a repo and name for renamingcmn/remote-renameCarlos Martín Nieto2014-10-241-25/+21
| | | | | | | | | | 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.
* Remote paths: canonicalize UNC paths on Win32Edward Thomson2014-10-221-4/+26
| | | | | | | Git for Windows will handle UNC paths only when in forward-slash format, eg "//server/path". When given a UNC path as a remote, rewrite standard format ("\\server\path") into this ridiculous format.
* Merge pull request #2593 from libgit2/cmn/remote-delete-nameEdward Thomson2014-10-101-19/+5
|\ | | | | remote: accept a repository and remote name for deletion
| * remote: accept a repository and remote name for deletioncmn/remote-delete-nameCarlos Martín Nieto2014-09-301-19/+5
| | | | | | | | | | | | | | | | 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.
* | Merge pull request #2542 from linquize/fetch-headCarlos Martín Nieto2014-10-101-3/+12
|\ \ | | | | | | Do not error out when fetching from second remote
| * | When updating FETCH_HEAD, do not treat it as error if the remote of current ↵Linquize2014-09-021-3/+12
| | | | | | | | | | | | branch is from another remote
* | | Treat an empty list of refspecs the same as a NULL value.Arthur Schreiber2014-10-101-1/+1
| | |
* | | Fix an uninitialized variableCarlos Martín Nieto2014-10-091-1/+1
| | |
* | | remote: implement opportunistic remote-tracking branch updatescmn/remote-fetch-refsCarlos Martín Nieto2014-09-301-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a list of refspecs is passed to fetch (what git would consider refspec passed on the command-line), we not only need to perform the updates described in that refspec, but also update the remote-tracking branch of the fetched remote heads according to the remote's configured refspecs. These "fetches" are not however to be written to FETCH_HEAD as they would be duplicate data, and it's not what the user asked for.
* | | remote: store passive refspecsCarlos Martín Nieto2014-09-301-1/+9
| | | | | | | | | | | | | | | | | | The configured/base fetch refspecs need to be taken into account in order to implement opportunistic remote-tracking branch updates. DWIM them and store them in the struct, but don't do anything with them yet.
* | | remote: don't DWIM refspecs unnecessarilyCarlos Martín Nieto2014-09-301-19/+3
| | | | | | | | | | | | | | | | | | | | | We can only DWIM when we've connected to the remote and have the list of the remote's references. Adding or setting the refspecs should not trigger an attempt to DWIM the refspecs as we typically cannot do it, and even if we did, we would not use them for the current fetch.
* | | remote: allow overriding the refspecs for download and fetchCarlos Martín Nieto2014-09-301-6/+35
| |/ |/| | | | | | | | | | | 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.
* | Merge remote-tracking branch 'upstream/master' into cmn/host-cert-infoCarlos Martín Nieto2014-09-161-2/+12
|\ \
| * \ Merge pull request #2554 from linquize/fetch-head-tagVicent Marti2014-09-151-2/+6
| |\ \ | | | | | | | | When auto follow tags, FETCH_HEAD should list only newly followed tags
| | * | When auto follow tags, FETCH_HEAD should list only newly followed tagsLinquize2014-09-061-2/+6
| | |/
| * | remote: short-circuit the default branch check if there is noneCarlos Martín Nieto2014-08-291-0/+3
| | | | | | | | | | | | | | | If we do not have a HEAD ref in the heads, we already know there is no default branch. Return immedately.
| * | remote: restrict default branch to branches namespaceCarlos Martín Nieto2014-08-291-0/+3
| |/
* | net: remove support for outright ignoring certificatesCarlos Martín Nieto2014-09-161-17/+3
| | | | | | | | | | | | | | | | | | | | 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.
* | Provide a callback for certificate validationCarlos Martín Nieto2014-09-161-1/+2
|/ | | | | | | | | 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_ls() should return an error if the transport is not availableJacques Germishuys2014-08-151-0/+7
|
* Improvements to git_transport extensibilityPhilip Kelley2014-06-261-8/+18
| | | | | 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
* remote: don't free the remote on deletecmn/remote-rename-moreCarlos Martín Nieto2014-06-061-2/+0
| | | | This was a bad idea. Don't free except in the free function.
* remote: handle symrefs when renamingCarlos Martín Nieto2014-06-061-10/+39
| | | | | | | 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.
* remote: return problem refspecs instead of using a callbackCarlos Martín Nieto2014-06-061-15/+25
| | | | | | 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.
* remote: make sure the name stays valid on renameCarlos Martín Nieto2014-06-061-3/+6
| | | | | | 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.
* remote: remove rename code for anonymous remotesCarlos Martín Nieto2014-06-061-42/+11
| | | | | | | | 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.
* remote: tighten up reference renamingcmn/remote-rename-fixesCarlos Martín Nieto2014-06-061-7/+9
| | | | | | | | 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.
* Merge pull request #2389 from ↵Vicent Marti2014-06-031-0/+1
|\ | | | | | | | | arthurschreiber/arthur/set-error-when-no-remote-found Remote: Set an error when a remote cannot be found.
| * Remote: Set an error when a remote cannot be found.Arthur Schreiber2014-05-301-0/+1
| | | | | | | | | | | | | | 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.
* | remote: build up the list of refs to removecmn/remote-deleteCarlos Martín Nieto2014-06-011-8/+34
|/ | | | | | 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.
* remote: add api to guess the remote's default branchCarlos Martín Nieto2014-05-211-0/+47
| | | | | If the remote supports the symref protocol extension, then we return that, otherwise we guess with git's rules.
* Merge pull request #2313 from libgit2/cmn/remote-deleteVicent Marti2014-05-161-3/+145
|\ | | | | Remote deletion
| * remote: remove remote-tracking branches on deleteCarlos Martín Nieto2014-05-161-4/+54
| | | | | | | | | | When we delete a remote, we also need to go through its fetch refspecs and remove the references they create locally.
| * remote: move branch upstream deletion to use an iteratorCarlos Martín Nieto2014-04-301-57/+38
| | | | | | | | This should make it more readable and allocate a bunch fewer strings.
| * remote: Introduce git_remote_delete()nulltoken2014-04-301-3/+114
| |
* | Merge pull request #2188 from libgit2/cmn/config-snapshotRussell Belfer2014-05-121-2/+3
|\ \ | | | | | | Configuration snapshotting
| * | repository: introduce a convenience config snapshot methodcmn/config-snapshotCarlos Martín Nieto2014-05-071-5/+2
| | | | | | | | | | | | | | | | | | 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.
| * | Use config snapshottingCarlos Martín Nieto2014-04-181-2/+6
| | | | | | | | | | | | | | | This way we can assume we have a consistent view of the config situation when we're looking up remote, branch, pack-objects, etc.
* | | Fix remaining init_options inconsistenciesRussell Belfer2014-05-021-9/+4
| | | | | | | | | | | | | | | There were a couple of "init_opts()" functions a few more cases of structure initialization that I somehow missed.
* | | Check for NULL before passing it to vsnprintfJacques Germishuys2014-04-301-1/+1
| |/ |/|
* | Merge pull request #2284 from jacquesg/push-progress-callbackVicent Marti2014-04-251-2/+2
|\ \ | | | | | | Fire progress and update tips callbacks also for pushes.