summaryrefslogtreecommitdiff
path: root/src/transports
Commit message (Collapse)AuthorAgeFilesLines
* http: increase buffer side to deal with side-band-64kCarlos Martín Nieto2012-08-251-1/+1
| | | | This poor transport was forgotten in the recent sideband support.
* network: add sideband supportCarlos Martín Nieto2012-08-241-1/+1
| | | | | This lets us notify the user of what the remote end is doing while we wait for it to start sending us the packfile.
* Fix warnings and merge issues on Win64Russell Belfer2012-08-231-1/+1
|
* transport: rename encrypt to use_sslCarlos Martín Nieto2012-07-301-1/+1
| | | | | SSL isn't the only way that a transport can be encrypted. The new name will make it easier to merge the SSH support.
* transport: store the refs in a common areaCarlos Martín Nieto2012-07-303-247/+132
| | | | | | | | Instad of each transport having its own function and logic to get to its refs, store them directly in transport. Leverage the new gitno_buffer to make the parsing and storing of the refs use common code and get rid of the git_protocol struct.
* remote: use the same code to control git and httpCarlos Martín Nieto2012-07-302-283/+60
| | | | | | | | This allows us to add capabilitites to both at the same time, keeps them in sync and removes a lot of code. gitno_buffer now uses a callback to fill its buffer, allowing us to use the same interface for git and http (which uses callbacks).
* network: implement multi_ack for the git transportCarlos Martín Nieto2012-07-301-0/+10
|
* remote: start moving the protocol to a common areaCarlos Martín Nieto2012-07-302-156/+7
| | | | | | | For the transition, http is going to keep its own logic until the git/common code catches up with the implied multi_ack that http has. This also has the side-effect of making the code cleaner and more correct regardingt he protocol.
* indexer: don't use '/objects/pack/' unconditionallyCarlos Martín Nieto2012-06-281-1/+6
| | | | | Not everyone who indexes a packfile wants to put it in the standard git repository location.
* transports: fix bugletMichael Schubert2012-06-052-2/+2
|
* Merge pull request #697 from carlosmn/sslVicent Martí2012-06-052-56/+76
|\ | | | | Add HTTPS support
| * ssl: allow skipping the server certificate checkCarlos Martín Nieto2012-05-261-0/+1
| | | | | | | | | | Sometimes it's useful not to perform the check. Allow it to be configurable.
| * ssl: teardown the connection on closeCarlos Martín Nieto2012-05-191-0/+3
| | | | | | | | | | This should help us free some resources, though the libraries do keep some buffers allocated regardless.
| * https: make it work with OpenSSL as wellCarlos Martín Nieto2012-05-191-2/+1
| | | | | | | | Add specific functions that use OpenSSL instead of GnuTLS
| * http: add https support when GnuTLS is availableCarlos Martín Nieto2012-05-192-57/+74
| | | | | | | | | | | | | | | | If it's not available, an error saying so will be returned when trying to use a https:// URL. This also unifies a lot of the network code to use git_transport in many places instead of an socket descriptor.
* | Fix git_close/http_close/local_close to set the transport's connected ↵Arthur Schreiber2012-06-023-0/+5
|/ | | | attribute to 0.
* Merge pull request #710 from libgit2/breaking-changesVicent Martí2012-05-183-9/+9
|\ | | | | Break everything before the release
| * errors: Rename error codesVicent Martí2012-05-182-4/+4
| |
| * errors: Rename the generic return codesVicent Martí2012-05-182-8/+8
| |
| * refs: git_reference_listall -> git_reference_listVicent Martí2012-05-181-1/+1
| |
* | fetch: set dummy function for local fetchMichael Schubert2012-05-181-0/+11
|/ | | | | | | Local fetch isn't implemented yet. Don't segfault on call, but set a dummy for negotiate_fetch and terminate gracefully. Reported-by: Brad Harder <bch@methodlogic.net>
* transport git: don't use 'error' uninitializedCarlos Martín Nieto2012-05-061-1/+1
|
* Merge remote-tracking branch 'scottjg/fix-mingw32' into developmentVicent Martí2012-05-052-12/+15
|\ | | | | | | | | | | | | | | Conflicts: src/netops.c src/netops.h src/transports/http.c tests-clar/clar
| * Fix gitno_connect() error handling on WindowsScott J. Goldman2012-05-052-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | gitno_connect() can return an error or socket, which is fine on most platforms where sockets are file descriptors (signed int), but on Windows, SOCKET is an unsigned type, which is problematic when we are trying to test if the socket was actually a negative error code. This fix seperates the error code and socket in gitno_connect(), and fixes the error handling in do_connect() functions to compensate. It appears that git_connect() and the git-transport do_connect() functions had bugs in the non-windows cases too (leaking sockets, and not properly reporting connection error, respectively) so I went ahead and fixed those too.
* | Remove old and unused error codesVicent Martí2012-05-022-4/+4
| |
* | Merge pull request #654 from carlosmn/pkt-errVicent Martí2012-04-301-0/+16
|\ \ | | | | | | Recognize and report server-side error messages
| * | net: recognize and report server-side error messagesCarlos Martín Nieto2012-04-301-0/+16
| | | | | | | | | | | | | | | When e.g. a repository isn't found, the server sends an error saying so. Put that error message in our error buffer.
* | | buf: deploy git_buf_len()nulltoken2012-04-301-5/+5
|/ /
* | transports: buffer the git requests before sending themCarlos Martín Nieto2012-04-252-87/+25
| | | | | | | | | | | | Trying to send every single line immediately won't give us any speed improvement and duplicates the code we need for other transports. Make the git transport use the same buffer functions as HTTP.
* | fetch: use the streaming indexer when downloading a packCarlos Martín Nieto2012-04-252-46/+35
| | | | | | | | | | | | | | | | This changes the git_remote_download() API, but the existing one is silly, so you don't get to complain. The new API allows to know how much data has been downloaded, how many objects we expect in total and how many we've processed.
* | Rename to git_reference_name_to_oidRussell Belfer2012-04-231-1/+1
| |
* | Fix warnings on 64-bit windows buildsRussell Belfer2012-04-172-5/+6
| | | | | | | | | | This fixes all the warnings on win64 except those in deps, which come from the regex code.
* | Add git_reference_lookup_oid and lookup_resolvedRussell Belfer2012-04-171-19/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a new public reference function `git_reference_lookup_oid` that directly resolved a reference name to an OID without returning the intermediate `git_reference` object (hence, no free needed). Internally, this adds a `git_reference_lookup_resolved` function that combines looking up and resolving a reference. This allows us to be more efficient with memory reallocation. The existing `git_reference_lookup` and `git_reference_resolve` are reimplmented on top of the new utility and a few places in the code are changed to use one of the two new functions.
* | local transport: plug leakCarlos Martín Nieto2012-04-121-0/+1
| |
* | error-handling local transportCarlos Martín Nieto2012-04-111-80/+66
| |
* | error-handling: httpCarlos Martín Nieto2012-04-111-165/+120
| |
* | error-handling: git transportCarlos Martín Nieto2012-04-111-134/+127
| |
* | transport/local: Fix peeling of nested tagsnulltoken2012-04-101-2/+7
| |
* | error-handling: RepositoryVicent Martí2012-03-072-2/+8
|/ | | | | | | | This also includes droping `git_buf_lasterror` because it makes no sense in the new system. Note that in most of the places were it has been dropped, the code needs cleanup. I.e. GIT_ENOMEM is going away, so instead it should return a generic `-1` and obviously not throw anything.
* Clean up GIT_UNUSED macros on all platformsRussell Belfer2012-03-021-3/+3
| | | | | | | | | | | | | | | | | | | It turns out that commit 31e9cfc4cbcaf1b38cdd3dbe3282a8f57e5366a5 did not fix the GIT_USUSED behavior on all platforms. This commit walks through and really cleans things up more thoroughly, getting rid of the unnecessary stuff. To remove the use of some GIT_UNUSED, I ended up adding a couple of new iterators for hashtables that allow you to iterator just over keys or just over values. In making this change, I found a bug in the clar tests (where we were doing *count++ but meant to do (*count)++ to increment the value). I fixed that but then found the test failing because it was not really using an empty repo. So, I took some of the code that I wrote for iterator testing and moved it to clar_helpers.c, then made use of that to make it easier to open fixtures on a per test basis even within a single test file.
* Update Copyright headerschu2012-02-133-3/+3
| | | | Signed-off-by: schu <schu-github@schulog.org>
* diff-index: fix leakCarlos Martín Nieto2012-01-191-1/+1
| | | | The buffer wasn't getting freed if the last difference was a deletion.
* http: use PRIuZCarlos Martín Nieto2012-01-191-1/+1
| | | | MSVC doesn't think %zd is a valid specifier.
* transport: make local transport accept a file Uri containing percent-encoded ↵nulltoken2011-12-281-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | characters This makes libgit2 compliant with the following scenario $ git ls-remote file:///d:/temp/dwm%20tinou 732d790b702db4b8985f5104fc44642654f6a6b6 HEAD 732d790b702db4b8985f5104fc44642654f6a6b6 refs/heads/master 732d790b702db4b8985f5104fc44642654f6a6b6 refs/remotes/origin/HEAD 732d790b702db4b8985f5104fc44642654f6a6b6 refs/remotes/origin/master $ mv "/d/temp/dwm tinou" /d/temp/dwm+tinou $ git ls-remote file:///d:/temp/dwm%20tinou fatal: 'd:/temp/dwm tinou' does not appear to be a git repository fatal: The remote end hung up unexpectedly $ git ls-remote file:///d:/temp/dwm+tinou 732d790b702db4b8985f5104fc44642654f6a6b6 HEAD 732d790b702db4b8985f5104fc44642654f6a6b6 refs/heads/master 732d790b702db4b8985f5104fc44642654f6a6b6 refs/remotes/origin/HEAD 732d790b702db4b8985f5104fc44642654f6a6b6 refs/remotes/origin/master
* remotes: Remove unused variablesVicent Martí2011-12-251-1/+0
|
* remote: add test to retrieve the advertised references from a local ↵nulltoken2011-12-211-7/+17
| | | | repository and fix related implementation
* Use git_buf for path storage instead of stack-based buffersRussell Belfer2011-12-072-10/+11
| | | | | | | | | | | | | | | | | | | | This converts virtually all of the places that allocate GIT_PATH_MAX buffers on the stack for manipulating paths to use git_buf objects instead. The patch is pretty careful not to touch the public API for libgit2, so there are a few places that still use GIT_PATH_MAX. This extends and changes some details of the git_buf implementation to add a couple of extra functions and to make error handling easier. This includes serious alterations to all the path.c functions, and several of the fileops.c ones, too. Also, there are a number of new functions that parallel existing ones except that use a git_buf instead of a stack-based buffer (such as git_config_find_global_r that exists alongsize git_config_find_global). This also modifies the win32 version of p_realpath to allocate whatever buffer size is needed to accommodate the realpath instead of hardcoding a GIT_PATH_MAX limit, but that change needs to be tested still.
* transports: fix -Wunused-but-set-variable warningschu2011-11-291-0/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* remote: Cleanup the remotes codeVicent Marti2011-11-283-105/+102
| | | | | | - Hide the remaining transports code - Drop `git_headarray`, switch to using a callback to list refs. Makes the code cleaner.
* Rename all `_close` methodsVicent Marti2011-11-261-1/+1
| | | | | There's no difference between `_free` and `_close` semantics: keep everything with the same name to avoid confusions.