summaryrefslogtreecommitdiff
path: root/include/git2/pkt.h
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup external APIVicent Marti2011-07-111-56/+0
| | | | | Some of the WIP API calls have been hidden in preparation for the next minor release.
* Move transports to an inheritance modelCarlos Martín Nieto2011-06-261-0/+1
| | | | | | | | | 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>
* Move git_pkt_{gen_proto,send_request} to transport_git.cCarlos Martín Nieto2011-06-261-5/+0
| | | | | | | This is where they really belong. Remvoe the prefix and make them static. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Use (s)size_tCarlos Martín Nieto2011-06-261-1/+1
| | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Implement and use git_pkt_send_requestCarlos Martín Nieto2011-06-261-1/+2
| | | | | | | | | | 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>
* Correctly handle network inputCarlos Martín Nieto2011-06-261-1/+1
| | | | | | | | | 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.
* Implement and use git_pkt_freeCarlos Martín Nieto2011-06-261-0/+1
| | | | | | | 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>
* Implement the git TCP transport up to ls-remoteCarlos Martín Nieto2011-06-261-0/+1
| | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Add function to generate a requestCarlos Martín Nieto2011-06-261-0/+5
| | | | | | Add git_pkt_gen_proto to crete a request from an url. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* pkt-line: read capabilitiesCarlos Martín Nieto2011-06-261-0/+1
| | | | | | | Try to read the server capabilities and add them to the git_pkt_ref struct. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* pkt-line: parse other-ref linesCarlos Martín Nieto2011-06-261-2/+2
| | | | | | Add support for parsing other-ref lines. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Lay the foundations for pkt-line parsingCarlos Martín Nieto2011-06-261-0/+51
This are the types I intend to use for pkt-line parsing and (later) creation. git_pkt serves as a base pointer type and once you know what type it is you can use the real one (command, tip list, etc.) Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>