}
static int do_fetch(struct transport *transport,
- struct refspec_item *refs, int ref_count)
+ struct refspec *rs)
{
struct string_list existing_refs = STRING_LIST_INIT_DUP;
struct ref *ref_map;
goto cleanup;
}
- ref_map = get_ref_map(transport, refs, ref_count, tags, &autotags);
+ ref_map = get_ref_map(transport, rs->items, rs->nr, tags, &autotags);
if (!update_head_ok)
check_not_current_branch(ref_map);
* explicitly (via command line or configuration); we
* don't care whether --tags was specified.
*/
- if (ref_count) {
- prune_refs(refs, ref_count, ref_map, transport->url);
+ if (rs->nr) {
+ prune_refs(rs->items, rs->nr, ref_map, transport->url);
} else {
prune_refs(transport->remote->fetch.items,
transport->remote->fetch.nr,
sigchain_push_common(unlock_pack_on_signal);
atexit(unlock_pack);
- exit_code = do_fetch(gtransport, rs.items, rs.nr);
+ exit_code = do_fetch(gtransport, &rs);
refspec_clear(&rs);
transport_disconnect(gtransport);
gtransport = NULL;