summaryrefslogtreecommitdiff
path: root/src/transports/git.c
Commit message (Collapse)AuthorAgeFilesLines
* git: put NULL check at the topCarlos Martín Nieto2015-10-301-2/+5
|
* git: accept NULL as argument to its stream freeCarlos Martín Nieto2015-10-301-2/+2
|
* Handle ssh:// and git:// urls containing a '~' character.Simon2015-08-031-0/+2
| | | | | For such a path '/~/...' the leading '/' is stripped so the server will get a path starting with '~' and correctly handle it.
* Merge pull request #2990 from leoyanggit/custom_paramEdward Thomson2015-03-241-1/+3
|\ | | | | Add a custom param to git_smart_subtransport_definition
| * Add a custom param to git_smart_subtransport_definitionLeo Yang2015-03-181-1/+3
| | | | | | | | | | The smart transport has already take the payload param. For the sub transport a payload param is useful for the implementer.
* | git: make sure to close the network streamCarlos Martín Nieto2015-03-211-0/+1
|/ | | | | In case of a bad url or other error during the connection setup, we close the stream via free.
* allocations: test for overflow of requested sizeEdward Thomson2015-02-121-2/+2
| | | | | Introduce some helper macros to test integer overflow from arithmetic and set error message appropriately.
* Port the TCP transport to the new stream APICarlos Martín Nieto2014-12-101-57/+71
|
* Custom transport: minor cleanupsEdward Thomson2014-08-141-0/+1
| | | | | | | | | | | | * 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://").
* Further EUSER and error propagation fixesRussell Belfer2013-12-111-11/+16
| | | | | | | | | | | | | This continues auditing all the places where GIT_EUSER is being returned and making sure to clear any existing error using the new giterr_user_cancel helper. As a result, places that relied on intercepting GIT_EUSER but having the old error preserved also needed to be cleaned up to correctly stash and then retrieve the actual error. Additionally, as I encountered places where error codes were not being propagated correctly, I tried to fix them up. A number of those fixes are included in the this commit as well.
* Use http_parser_parse_url to parse urlsBen Straub2013-11-041-42/+30
|
* Initialize variablesBen Straub2013-10-301-2/+2
|
* Address feedbackBen Straub2013-02-041-4/+4
|
* Remove double-free segfaultsBen Straub2013-01-311-6/+6
|
* Enhance url parsing to include passwordsBen Straub2013-01-311-4/+6
|
* Stash username from url (but don't use it yet)Ben Straub2013-01-301-4/+6
|
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Remove casts of return values of type void *Philip Kelley2012-11-291-2/+2
|
* Push! By schu, phkelley, and congyiwu, et alPhilip Kelley2012-11-281-8/+81
|
* Reorganize transport architecture (squashed 3)Philip Kelley2012-11-011-130/+160
|
* 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.
* transport: store the refs in a common areaCarlos Martín Nieto2012-07-301-79/+23
| | | | | | | | 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-301-37/+1
| | | | | | | | 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-301-156/+6
| | | | | | | 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.
* transports: fix bugletMichael Schubert2012-06-051-1/+1
|
* Merge pull request #697 from carlosmn/sslVicent Martí2012-06-051-27/+24
|\ | | | | Add HTTPS support
| * http: add https support when GnuTLS is availableCarlos Martín Nieto2012-05-191-27/+24
| | | | | | | | | | | | | | | | 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-021-0/+2
|/ | | | attribute to 0.
* errors: Rename error codesbreaking-changesVicent Martí2012-05-181-3/+3
|
* errors: Rename the generic return codesVicent Martí2012-05-181-5/+5
|
* 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-051-10/+13
|\ | | | | | | | | | | | | | | Conflicts: src/netops.c src/netops.h src/transports/http.c tests-clar/clar
| * Fix gitno_connect() error handling on WindowsScott J. Goldman2012-05-051-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-021-1/+1
| |
* | transports: buffer the git requests before sending themCarlos Martín Nieto2012-04-251-48/+24
| | | | | | | | | | | | 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-251-2/+2
| | | | | | | | | | | | | | | | 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.
* | Fix warnings on 64-bit windows buildsRussell Belfer2012-04-171-3/+4
| | | | | | | | | | This fixes all the warnings on win64 except those in deps, which come from the regex code.
* | error-handling: git transportCarlos Martín Nieto2012-04-111-134/+127
| |
* | error-handling: RepositoryVicent Martí2012-03-071-1/+4
|/ | | | | | | | 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.
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* Use git_buf for path storage instead of stack-based buffersRussell Belfer2011-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | 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.
* remote: Cleanup the remotes coderepo-ownershipVicent Marti2011-11-281-12/+11
| | | | | | - Hide the remaining transports code - Drop `git_headarray`, switch to using a callback to list refs. Makes the code cleaner.
* net: move the reference storage to common codeCarlos Martín Nieto2011-11-181-29/+16
|
* global: Properly use `git__` memory wrappersVicent Marti2011-10-281-9/+9
| | | | | Ensure that all memory related functions (malloc, calloc, strdup, free, etc) are using their respective `git__` wrappers.
* Move the transports to their own directoryCarlos Martín Nieto2011-10-121-0/+516