|
392702ee
|
2015-02-09T23:41:13
|
|
allocations: test for overflow of requested size
Introduce some helper macros to test integer overflow from arithmetic
and set error message appropriately.
|
|
02b4c1e2
|
2014-11-01T16:58:20
|
|
Port the TCP transport to the new stream API
|
|
c180c065
|
2014-07-09T17:58:39
|
|
Custom transport: minor cleanups
* 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://").
|
|
dab89f9b
|
2013-12-04T21:22:57
|
|
Further EUSER and error propagation fixes
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.
|
|
c227c173
|
2013-11-04T11:42:14
|
|
Use http_parser_parse_url to parse urls
|
|
29b77446
|
2013-10-30T15:38:52
|
|
Initialize variables
|
|
630146bd
|
2013-02-04T13:52:18
|
|
Address feedback
|
|
8c36a3cd
|
2013-01-31T15:24:59
|
|
Remove double-free segfaults
|
|
cf7038a6
|
2013-01-31T14:04:21
|
|
Enhance url parsing to include passwords
|
|
2234b2b0
|
2013-01-30T19:03:58
|
|
Stash username from url (but don't use it yet)
|
|
359fc2d2
|
2013-01-08T17:07:25
|
|
update copyrights
|
|
6762fe08
|
2012-11-29T08:29:26
|
|
Remove casts of return values of type void *
|
|
613d5eb9
|
2012-11-28T11:42:37
|
|
Push! By schu, phkelley, and congyiwu, et al
|
|
41fb1ca0
|
2012-10-29T13:41:14
|
|
Reorganize transport architecture (squashed 3)
|
|
e03e71da
|
2012-05-14T17:54:25
|
|
network: add sideband support
This lets us notify the user of what the remote end is doing while we
wait for it to start sending us the packfile.
|
|
5dca2010
|
2012-08-03T17:08:01
|
|
Update iterators for consistency across library
This updates all the `foreach()` type functions across the library
that take callbacks from the user to have a consistent behavior.
The rules are:
* A callback terminates the loop by returning any non-zero value
* Once the callback returns non-zero, it will not be called again
(i.e. the loop stops all iteration regardless of state)
* If the callback returns non-zero, the parent fn returns GIT_EUSER
* Although the parent returns GIT_EUSER, no error will be set in
the library and `giterr_last()` will return NULL if called.
This commit makes those changes across the library and adds tests
for most of the iteration APIs to make sure that they follow the
above rules.
|
|
ad4b5beb
|
2012-07-25T10:40:59
|
|
transport: store the refs in a common area
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.
|
|
b49c8f71
|
2012-07-24T19:03:22
|
|
remote: use the same code to control git and http
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).
|
|
114dc6e1
|
2012-07-24T17:10:57
|
|
network: implement multi_ack for the git transport
|
|
64d01de8
|
2012-07-24T14:23:16
|
|
remote: start moving the protocol to a common area
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.
|
|
fdc5c38e
|
2012-06-05T23:03:06
|
|
transports: fix buglet
|
|
966fbdcb
|
2012-06-05T13:53:33
|
|
Merge pull request #697 from carlosmn/ssl
Add HTTPS support
|
|
e9551e86
|
2012-06-02T16:52:22
|
|
Fix git_close/http_close/local_close to set the transport's connected attribute to 0.
|
|
66024c7c
|
2012-05-01T00:05:25
|
|
http: add https support when GnuTLS is available
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.
|
|
904b67e6
|
2012-05-18T01:48:50
|
|
errors: Rename error codes
|
|
e172cf08
|
2012-05-18T01:21:06
|
|
errors: Rename the generic return codes
|
|
49ac5ac8
|
2012-05-06T13:17:25
|
|
transport git: don't use 'error' uninitialized
|
|
cd58c15c
|
2012-05-05T16:47:20
|
|
Merge remote-tracking branch 'scottjg/fix-mingw32' into development
Conflicts:
src/netops.c
src/netops.h
src/transports/http.c
tests-clar/clar
|
|
b4b96d56
|
2012-05-05T13:30:33
|
|
Fix gitno_connect() error handling on Windows
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.
|
|
3fbcac89
|
2012-05-02T19:56:38
|
|
Remove old and unused error codes
|
|
dee5515a
|
2012-04-14T18:34:50
|
|
transports: buffer the git requests before sending them
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.
|
|
7a520f5d
|
2012-04-13T23:19:38
|
|
fetch: use the streaming indexer when downloading a pack
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.
|
|
44ef8b1b
|
2012-04-13T13:00:10
|
|
Fix warnings on 64-bit windows builds
This fixes all the warnings on win64 except those in deps, which
come from the regex code.
|
|
2b386acd
|
2012-03-06T10:47:18
|
|
error-handling: git transport
|
|
cb8a7961
|
2012-03-07T00:02:55
|
|
error-handling: Repository
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.
|
|
5e0de328
|
2012-02-13T17:10:24
|
|
Update Copyright header
Signed-off-by: schu <schu-github@schulog.org>
|
|
97769280
|
2011-11-30T11:27:15
|
|
Use git_buf for path storage instead of stack-based buffers
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.
|
|
d88d4311
|
2011-11-28T08:40:40
|
|
remote: Cleanup the remotes code
- Hide the remaining transports code
- Drop `git_headarray`, switch to using a callback to list refs. Makes
the code cleaner.
|
|
40a40e8e
|
2011-10-26T18:06:36
|
|
net: move the reference storage to common code
|
|
3286c408
|
2011-10-28T14:51:13
|
|
global: Properly use `git__` memory wrappers
Ensure that all memory related functions (malloc, calloc, strdup, free,
etc) are using their respective `git__` wrappers.
|
|
dfafb03b
|
2011-10-07T00:44:41
|
|
Move the transports to their own directory
|