ls-refs: introduce ls-refs server command

Introduce the ls-refs server command.  In protocol v2, the ls-refs
command is used to request the ref advertisement from the server.  Since
it is a command which can be requested (as opposed to mandatory in v1),
a client can sent a number of parameters in its request to limit the ref
advertisement based on provided ref-prefixes.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Brandon Williams
2018-03-15 10:31:20 -07:00
committed by Junio C Hamano
parent ed10cb952d
commit 72d0ea0056
6 changed files with 261 additions and 0 deletions

10
ls-refs.h Normal file
View File

@ -0,0 +1,10 @@
#ifndef LS_REFS_H
#define LS_REFS_H
struct repository;
struct argv_array;
struct packet_reader;
extern int ls_refs(struct repository *r, struct argv_array *keys,
struct packet_reader *request);
#endif /* LS_REFS_H */