interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / connect.h

45 lines · 1642 bytes Raw Blame History
1#ifndef CONNECT_H
2#define CONNECT_H
3
4#include "protocol.h"
5
6#define CONNECT_VERBOSE (1u << 0)
7#define CONNECT_DIAG_URL (1u << 1)
8#define CONNECT_IPV4 (1u << 2)
9#define CONNECT_IPV6 (1u << 3)
10enum git_connect_service {
11 GIT_CONNECT_UPLOAD_PACK,
12 GIT_CONNECT_RECEIVE_PACK,
13 GIT_CONNECT_UPLOAD_ARCHIVE,
14};
15struct child_process *git_connect(int fd[2], const char *url, enum git_connect_service, const char *prog, int flags);
16int finish_connect(struct child_process *conn);
17int git_connection_is_socket(struct child_process *conn);
18int server_supports(const char *feature);
19int parse_feature_request(const char *features, const char *feature);
20const char *server_feature_value(const char *feature, size_t *len_ret);
21
22struct packet_reader;
23enum protocol_version discover_version(struct packet_reader *reader);
24
25int server_supports_hash(const char *desired, int *feature_supported);
26const char *parse_feature_value(const char *feature_list, const char *feature, size_t *lenp, size_t *offset);
27int server_supports_v2(const char *c);
28void ensure_server_supports_v2(const char *c);
29int server_feature_v2(const char *c, const char **v);
30int server_supports_feature(const char *c, const char *feature,
31 int die_on_error);
32
33void check_stateless_delimiter(int stateless_rpc,
34 struct packet_reader *reader,
35 const char *error);
36
37struct string_list;
38/*
39 * Write a protocol v2 command request, along with the capability
40 * advertisements, into req_buf.
41 */
42void write_command_and_capabilities(struct strbuf *req_buf, const char *command,
43 const struct string_list *server_options);
44
45#endif