path: root/transport.h
diff options
authorDaniel Barkalow <>2008-04-17 23:32:22 (GMT)
committerJunio C Hamano <>2008-05-05 00:41:44 (GMT)
commit2d5c298f91b4b76a8b51b9b66283ef5a872736a0 (patch)
treeb24f7622fba5d782fe42c94d4f17fd7bd5080808 /transport.h
parentc697ad143ba1ff58b29e7efe149d244d4b7010a5 (diff)
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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'transport.h')
1 files changed, 2 insertions, 2 deletions
diff --git a/transport.h b/transport.h
index 8abfc0a..d0b5205 100644
--- a/transport.h
+++ b/transport.h
@@ -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);