Introduce git-serve, the base server for protocol version 2. Protocol version 2 is intended to be a replacement for Git's current wire protocol. The intention is that it will be a simpler, less wasteful protocol which can evolve over time. Protocol version 2 improves upon version 1 by eliminating the initial ref advertisement. In its place a server will export a list of capabilities and commands which it supports in a capability advertisement. A client can then request that a particular command be executed by providing a number of capabilities and command specific parameters. At the completion of a command, a client can request that another command be executed or can terminate the connection by sending a flush packet. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
		
			
				
	
	
		
			16 lines
		
	
	
		
			350 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			350 B
		
	
	
	
		
			C
		
	
	
	
	
	
#ifndef SERVE_H
 | 
						|
#define SERVE_H
 | 
						|
 | 
						|
struct argv_array;
 | 
						|
extern int has_capability(const struct argv_array *keys, const char *capability,
 | 
						|
			  const char **value);
 | 
						|
 | 
						|
struct serve_options {
 | 
						|
	unsigned advertise_capabilities;
 | 
						|
	unsigned stateless_rpc;
 | 
						|
};
 | 
						|
#define SERVE_OPTIONS_INIT { 0 }
 | 
						|
extern void serve(struct serve_options *options);
 | 
						|
 | 
						|
#endif /* SERVE_H */
 |