src/transport_git.c


Log

Author Commit Date CI Message
Vicent Marti bdd18829 2011-07-11T02:58:00 Cleanup external API Some of the WIP API calls have been hidden in preparation for the next minor release.
Carlos Martín Nieto 39cdf272 2011-07-06T09:11:03 Fix network MSYS compilation MSYS/MinGW uses winsock but obviously doesn't set _MSC_VER. Use _WIN32 to decide whether to use winsock or BSD headers. Also remove these headers from src/transport_git.c altogether, as they are not needed. MSYS is very conservative, so we have to tell it that we don't care about versions of Windows lower than WindowsXP. We also need to tell CMake to add ws2_32 to the libraries list and we shouldn't add the -fPIC option, to MSYS because it complains that it does it anyway. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 0ac2726f 2011-06-27T20:23:47 Slim down git_transport Remove the unused repo and private pointers and make the direction a flag, as it can only have two states. Change the connect signature to use an int instead of git_net_direction and remove that enum. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 5da5321d 2011-06-27T20:01:57 Initialize memory in git transport At the same time, do mark the transport as connected. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto c7c787ce 2011-06-24T18:19:00 Use gitno_buffer in the git transport This allows us to leave out the buffer handling logic. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 4e913309 2011-06-17T16:38:21 Move transports to an inheritance model Rather than an 'private' pointer, make the private structures inherit from the generic git_transport struct. This way, we only have to worry about one memory allocation instead of two. The structures are so simple that this may even make the code use less memory overall. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto fd679021 2011-06-16T02:17:49 Move git_pkt_{gen_proto,send_request} to transport_git.c This is where they really belong. Remvoe the prefix and make them static. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto c4d0fa85 2011-06-16T01:54:19 Implement and use git_pkt_send_request This makes it easier to send a requqest for an URL. It assumes there is a socket where the string should go out to. Make git_pkt_gen_proto accept a command parameter, which defaults to git-upload-pack Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 4e95ef02 2011-06-16T00:59:46 Implement and use gitno_send
Carlos Martín Nieto 1b4f8140 2011-06-16T00:39:35 Create netops and start moving git:// to it Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto 7632e249 2011-06-13T23:01:12 Correctly handle network input Add a parameter to git_pkt_parse_line to tell it how much data you have in your buffer. If the buffer is too short, it returns an error saying so. Adapt the git transport to use this and fix the offset calculation. Add the GIT_ESHORTBUFFER error code.
Carlos Martín Nieto be9fe679 2011-06-08T23:38:22 Implement and use git_pkt_free A git_pkt object can be one of several structs. Add this function for convenience and clarity. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto ecb6ca0e 2011-06-08T13:09:47 Implement the git TCP transport up to ls-remote Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>