@@ -203,7 +203,7 @@ static struct ref *get_refs_via_rsync(struct transport *transport)
203
203
}
204
204
205
205
static int fetch_objs_via_rsync (struct transport * transport ,
206
- int nr_objs , struct ref * * to_fetch )
206
+ int nr_objs , const struct ref * * to_fetch )
207
207
{
208
208
struct strbuf buf = STRBUF_INIT ;
209
209
struct child_process rsync ;
@@ -350,7 +350,7 @@ static int rsync_transport_push(struct transport *transport,
350
350
351
351
#ifndef NO_CURL /* http fetch is the only user */
352
352
static int fetch_objs_via_walker (struct transport * transport ,
353
- int nr_objs , struct ref * * to_fetch )
353
+ int nr_objs , const struct ref * * to_fetch )
354
354
{
355
355
char * dest = xstrdup (transport -> url );
356
356
struct walker * walker = transport -> data ;
@@ -504,7 +504,7 @@ static struct ref *get_refs_via_curl(struct transport *transport)
504
504
}
505
505
506
506
static int fetch_objs_via_curl (struct transport * transport ,
507
- int nr_objs , struct ref * * to_fetch )
507
+ int nr_objs , const struct ref * * to_fetch )
508
508
{
509
509
if (!transport -> data )
510
510
transport -> data = get_http_walker (transport -> url ,
@@ -542,7 +542,7 @@ static struct ref *get_refs_from_bundle(struct transport *transport)
542
542
}
543
543
544
544
static int fetch_refs_from_bundle (struct transport * transport ,
545
- int nr_heads , struct ref * * to_fetch )
545
+ int nr_heads , const struct ref * * to_fetch )
546
546
{
547
547
struct bundle_transport_data * data = transport -> data ;
548
548
return unbundle (& data -> header , data -> fd );
@@ -616,7 +616,7 @@ static struct ref *get_refs_via_connect(struct transport *transport)
616
616
}
617
617
618
618
static int fetch_refs_via_pack (struct transport * transport ,
619
- int nr_heads , struct ref * * to_fetch )
619
+ int nr_heads , const struct ref * * to_fetch )
620
620
{
621
621
struct git_transport_data * data = transport -> data ;
622
622
char * * heads = xmalloc (nr_heads * sizeof (* heads ));
@@ -784,12 +784,12 @@ const struct ref *transport_get_remote_refs(struct transport *transport)
784
784
return transport -> remote_refs ;
785
785
}
786
786
787
- int transport_fetch_refs (struct transport * transport , struct ref * refs )
787
+ int transport_fetch_refs (struct transport * transport , const struct ref * refs )
788
788
{
789
789
int rc ;
790
790
int nr_heads = 0 , nr_alloc = 0 ;
791
- struct ref * * heads = NULL ;
792
- struct ref * rm ;
791
+ const struct ref * * heads = NULL ;
792
+ const struct ref * rm ;
793
793
794
794
for (rm = refs ; rm ; rm = rm -> next ) {
795
795
if (rm -> peer_ref &&
0 commit comments