@@ -127,8 +127,7 @@ static int ls_refs_config(const char *var, const char *value, void *data)
return parse_hide_refs_config(var, value, "uploadpack");
}
-int ls_refs(struct repository *r, struct strvec *keys,
- struct packet_reader *request)
+int ls_refs(struct repository *r, struct packet_reader *request)
{
struct ls_refs_data data;
@@ -2,10 +2,8 @@
#define LS_REFS_H
struct repository;
-struct strvec;
struct packet_reader;
-int ls_refs(struct repository *r, struct strvec *keys,
- struct packet_reader *request);
+int ls_refs(struct repository *r, struct packet_reader *request);
int ls_refs_startup_config(const char *var, const char *value, void *data);
int ls_refs_advertise(struct repository *r, struct strbuf *value);
@@ -75,8 +75,7 @@ static void send_info(struct repository *r, struct packet_writer *writer,
strbuf_release(&send_buffer);
}
-int cap_object_info(struct repository *r, struct strvec *keys,
- struct packet_reader *request)
+int cap_object_info(struct repository *r, struct packet_reader *request)
{
struct requested_info info;
struct packet_writer writer;
@@ -2,9 +2,7 @@
#define PROTOCOL_CAPS_H
struct repository;
-struct strvec;
struct packet_reader;
-int cap_object_info(struct repository *r, struct strvec *keys,
- struct packet_reader *request);
+int cap_object_info(struct repository *r, struct packet_reader *request);
#endif /* PROTOCOL_CAPS_H */
@@ -50,7 +50,7 @@ static int session_id_advertise(struct repository *r, struct strbuf *value)
}
typedef int (*advertise_fn_t)(struct repository *r, struct strbuf *value);
-typedef int (*command_fn_t)(struct repository *r, struct strvec *keys,
+typedef int (*command_fn_t)(struct repository *r,
struct packet_reader *request);
struct protocol_capability {
@@ -89,8 +89,7 @@ struct protocol_capability {
/*
* Function called when a client requests the capability as a command.
- * The function will be provided the capabilities requested via 'keys'
- * as well as a struct packet_reader 'request' which the command should
+ * Will be provided a struct packet_reader 'request' which it should
* use to read the command specific part of the request. Every command
* MUST read until a flush packet is seen before sending a response.
*
@@ -160,7 +159,7 @@ static int call_command(struct protocol_capability *command,
read_startup_config(command);
- return command->command(r, keys, request);
+ return command->command(r, request);
}
void protocol_v2_advertise_capabilities(void)
@@ -1680,8 +1680,7 @@ enum fetch_state {
FETCH_DONE,
};
-int upload_pack_v2(struct repository *r, struct strvec *keys,
- struct packet_reader *request)
+int upload_pack_v2(struct repository *r, struct packet_reader *request)
{
enum fetch_state state = FETCH_PROCESS_ARGS;
struct upload_pack_data data;
@@ -5,10 +5,8 @@ void upload_pack(const int advertise_refs, const int stateless_rpc,
const int timeout);
struct repository;
-struct strvec;
struct packet_reader;
-int upload_pack_v2(struct repository *r, struct strvec *keys,
- struct packet_reader *request);
+int upload_pack_v2(struct repository *r, struct packet_reader *request);
struct strbuf;
int upload_pack_advertise(struct repository *r,
The serve.c API added in ed10cb952d3 (serve: introduce git-serve, 2018-03-15) was passing in the raw capabilities "keys", but nothing downstream of it ever used them. Let's remove that code because it's not needed, and because if and when we need to pass data about the advertisement (I have some WIP patches for that), it makes much more sense to have the serve.c parse the capabilities, and then pass specific information we need down than expecting its API users to re-do their own parsing of the raw data. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- ls-refs.c | 3 +-- ls-refs.h | 4 +--- protocol-caps.c | 3 +-- protocol-caps.h | 4 +--- serve.c | 7 +++---- upload-pack.c | 3 +-- upload-pack.h | 4 +--- 7 files changed, 9 insertions(+), 19 deletions(-)