diff options
| author | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-06-16 01:54:19 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-06-26 20:43:44 +0200 |
| commit | c4d0fa85b1032690a89989bf15f984b3840b3eee (patch) | |
| tree | 32b0982966e63e977cc6517c644f4ed7c6e4958c /include/git2 | |
| parent | 4e95ef0268137cf17c43f72863606803b0277bdf (diff) | |
| download | libgit2-c4d0fa85b1032690a89989bf15f984b3840b3eee.tar.gz | |
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>
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/pkt.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/git2/pkt.h b/include/git2/pkt.h index 79c582828..7a91ed490 100644 --- a/include/git2/pkt.h +++ b/include/git2/pkt.h @@ -54,6 +54,7 @@ struct git_pkt_ref { /** * Create a git protocol request. */ -int git_pkt_gen_proto(char **out, int *outlen, const char *url); +int git_pkt_gen_proto(char **out, int *outlen, const char *cmd, const char *url); +int git_pkt_send_request(int socket, const char *cmd, const char *url); int git_pkt_parse_line(git_pkt **head, const char *line, const char **out, unsigned int len); void git_pkt_free(git_pkt *pkt); |
