builtin/show: do not prune by pathspec
[git/mjg.git] / protocol.h
blob1e574bbd80be1bf9d9366dfefd24e3016ec87cf0
1 #ifndef PROTOCOL_H
2 #define PROTOCOL_H
4 /*
5 * Intensive research over the course of many years has shown that
6 * port 9418 is totally unused by anything else. Or
8 * Your search - "port 9418" - did not match any documents.
10 * as www.google.com puts it.
12 * This port has been properly assigned for git use by IANA:
13 * git (Assigned-9418) [I06-050728-0001].
15 * git 9418/tcp git pack transfer service
16 * git 9418/udp git pack transfer service
18 * with Linus Torvalds <torvalds@osdl.org> as the point of
19 * contact. September 2005.
21 * See https://www.iana.org/assignments/port-numbers
23 #define DEFAULT_GIT_PORT 9418
25 enum protocol_version {
26 protocol_unknown_version = -1,
27 protocol_v0 = 0,
28 protocol_v1 = 1,
29 protocol_v2 = 2,
33 * Used by a client to determine which protocol version to request be used when
34 * communicating with a server, reflecting the configured value of the
35 * 'protocol.version' config. If unconfigured, a value of 'protocol_v0' is
36 * returned.
38 enum protocol_version get_protocol_version_config(void);
41 * Used by a server to determine which protocol version should be used based on
42 * a client's request, communicated via the 'GIT_PROTOCOL' environment variable
43 * by setting appropriate values for the key 'version'. If a client doesn't
44 * request a particular protocol version, a default of 'protocol_v0' will be
45 * used.
47 enum protocol_version determine_protocol_version_server(void);
50 * Used by a client to determine which protocol version the server is speaking
51 * based on the server's initial response.
53 enum protocol_version determine_protocol_version_client(const char *server_response);
55 #endif /* PROTOCOL_H */