Mark the list of refs to fetch as const
Fetching the objects doesn't actually modify the list in any of the code paths, so this will allow code that fetches the entire (const) list of available refs to just pass the list in directly. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
c697ad143b
commit
2d5c298f91
@ -19,7 +19,7 @@ struct transport {
|
||||
const char *value);
|
||||
|
||||
struct ref *(*get_refs_list)(struct transport *transport);
|
||||
int (*fetch)(struct transport *transport, int refs_nr, struct ref **refs);
|
||||
int (*fetch)(struct transport *transport, int refs_nr, const struct ref **refs);
|
||||
int (*push)(struct transport *connection, int refspec_nr, const char **refspec, int flags);
|
||||
|
||||
int (*disconnect)(struct transport *connection);
|
||||
@ -68,7 +68,7 @@ int transport_push(struct transport *connection,
|
||||
|
||||
const struct ref *transport_get_remote_refs(struct transport *transport);
|
||||
|
||||
int transport_fetch_refs(struct transport *transport, struct ref *refs);
|
||||
int transport_fetch_refs(struct transport *transport, const struct ref *refs);
|
||||
void transport_unlock_pack(struct transport *transport);
|
||||
int transport_disconnect(struct transport *transport);
|
||||
|
||||
|
Reference in New Issue
Block a user