@@ -881,8 +881,7 @@ static void format_display(struct strbuf *display, char code,
881
881
static int update_local_ref (struct ref * ref ,
882
882
struct ref_transaction * transaction ,
883
883
const char * remote , const struct ref * remote_ref ,
884
- struct strbuf * display , int summary_width ,
885
- struct worktree * * worktrees )
884
+ struct strbuf * display , int summary_width )
886
885
{
887
886
struct commit * current = NULL , * updated ;
888
887
const char * pretty_ref = prettify_refname (ref -> name );
@@ -1107,7 +1106,7 @@ N_("it took %.2f seconds to check forced updates; you can use\n"
1107
1106
static int store_updated_refs (const char * raw_url , const char * remote_name ,
1108
1107
int connectivity_checked ,
1109
1108
struct ref_transaction * transaction , struct ref * ref_map ,
1110
- struct fetch_head * fetch_head , struct worktree * * worktrees )
1109
+ struct fetch_head * fetch_head )
1111
1110
{
1112
1111
int url_len , i , rc = 0 ;
1113
1112
struct strbuf note = STRBUF_INIT , err = STRBUF_INIT ;
@@ -1237,8 +1236,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
1237
1236
strbuf_reset (& note );
1238
1237
if (ref ) {
1239
1238
rc |= update_local_ref (ref , transaction , what ,
1240
- rm , & note , summary_width ,
1241
- worktrees );
1239
+ rm , & note , summary_width );
1242
1240
free (ref );
1243
1241
} else if (write_fetch_head || dry_run ) {
1244
1242
/*
@@ -1329,8 +1327,7 @@ static int check_exist_and_connected(struct ref *ref_map)
1329
1327
static int fetch_and_consume_refs (struct transport * transport ,
1330
1328
struct ref_transaction * transaction ,
1331
1329
struct ref * ref_map ,
1332
- struct fetch_head * fetch_head ,
1333
- struct worktree * * worktrees )
1330
+ struct fetch_head * fetch_head )
1334
1331
{
1335
1332
int connectivity_checked = 1 ;
1336
1333
int ret ;
@@ -1353,7 +1350,7 @@ static int fetch_and_consume_refs(struct transport *transport,
1353
1350
trace2_region_enter ("fetch" , "consume_refs" , the_repository );
1354
1351
ret = store_updated_refs (transport -> url , transport -> remote -> name ,
1355
1352
connectivity_checked , transaction , ref_map ,
1356
- fetch_head , worktrees );
1353
+ fetch_head );
1357
1354
trace2_region_leave ("fetch" , "consume_refs" , the_repository );
1358
1355
1359
1356
out :
@@ -1543,8 +1540,7 @@ static struct transport *prepare_transport(struct remote *remote, int deepen)
1543
1540
static int backfill_tags (struct transport * transport ,
1544
1541
struct ref_transaction * transaction ,
1545
1542
struct ref * ref_map ,
1546
- struct fetch_head * fetch_head ,
1547
- struct worktree * * worktrees )
1543
+ struct fetch_head * fetch_head )
1548
1544
{
1549
1545
int retcode , cannot_reuse ;
1550
1546
@@ -1565,7 +1561,7 @@ static int backfill_tags(struct transport *transport,
1565
1561
transport_set_option (transport , TRANS_OPT_FOLLOWTAGS , NULL );
1566
1562
transport_set_option (transport , TRANS_OPT_DEPTH , "0" );
1567
1563
transport_set_option (transport , TRANS_OPT_DEEPEN_RELATIVE , NULL );
1568
- retcode = fetch_and_consume_refs (transport , transaction , ref_map , fetch_head , worktrees );
1564
+ retcode = fetch_and_consume_refs (transport , transaction , ref_map , fetch_head );
1569
1565
1570
1566
if (gsecondary ) {
1571
1567
transport_disconnect (gsecondary );
@@ -1586,7 +1582,6 @@ static int do_fetch(struct transport *transport,
1586
1582
struct transport_ls_refs_options transport_ls_refs_options =
1587
1583
TRANSPORT_LS_REFS_OPTIONS_INIT ;
1588
1584
int must_list_refs = 1 ;
1589
- struct worktree * * worktrees = get_worktrees ();
1590
1585
struct fetch_head fetch_head = { 0 };
1591
1586
struct strbuf err = STRBUF_INIT ;
1592
1587
@@ -1677,7 +1672,7 @@ static int do_fetch(struct transport *transport,
1677
1672
retcode = 1 ;
1678
1673
}
1679
1674
1680
- if (fetch_and_consume_refs (transport , transaction , ref_map , & fetch_head , worktrees )) {
1675
+ if (fetch_and_consume_refs (transport , transaction , ref_map , & fetch_head )) {
1681
1676
retcode = 1 ;
1682
1677
goto cleanup ;
1683
1678
}
@@ -1700,7 +1695,7 @@ static int do_fetch(struct transport *transport,
1700
1695
* the transaction and don't commit anything.
1701
1696
*/
1702
1697
if (backfill_tags (transport , transaction , tags_ref_map ,
1703
- & fetch_head , worktrees ))
1698
+ & fetch_head ))
1704
1699
retcode = 1 ;
1705
1700
}
1706
1701
@@ -1785,7 +1780,6 @@ static int do_fetch(struct transport *transport,
1785
1780
close_fetch_head (& fetch_head );
1786
1781
strbuf_release (& err );
1787
1782
free_refs (ref_map );
1788
- free_worktrees (worktrees );
1789
1783
return retcode ;
1790
1784
}
1791
1785
0 commit comments