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>
maint
Daniel Barkalow17 years agocommitted byJunio C Hamano
@ -203,7 +203,7 @@ static struct ref *get_refs_via_rsync(struct transport *transport)
@@ -203,7 +203,7 @@ static struct ref *get_refs_via_rsync(struct transport *transport)
}
static int fetch_objs_via_rsync(struct transport *transport,
int nr_objs, struct ref **to_fetch)
int nr_objs, const struct ref **to_fetch)
{
struct strbuf buf = STRBUF_INIT;
struct child_process rsync;
@ -350,7 +350,7 @@ static int rsync_transport_push(struct transport *transport,
@@ -350,7 +350,7 @@ static int rsync_transport_push(struct transport *transport,
#ifndef NO_CURL /* http fetch is the only user */
static int fetch_objs_via_walker(struct transport *transport,
int nr_objs, struct ref **to_fetch)
int nr_objs, const struct ref **to_fetch)
{
char *dest = xstrdup(transport->url);
struct walker *walker = transport->data;
@ -504,7 +504,7 @@ static struct ref *get_refs_via_curl(struct transport *transport)
@@ -504,7 +504,7 @@ static struct ref *get_refs_via_curl(struct transport *transport)
}
static int fetch_objs_via_curl(struct transport *transport,
int nr_objs, struct ref **to_fetch)
int nr_objs, const struct ref **to_fetch)
{
if (!transport->data)
transport->data = get_http_walker(transport->url,
@ -542,7 +542,7 @@ static struct ref *get_refs_from_bundle(struct transport *transport)
@@ -542,7 +542,7 @@ static struct ref *get_refs_from_bundle(struct transport *transport)
}
static int fetch_refs_from_bundle(struct transport *transport,