mirror of
https://github.com/git-for-windows/git.git
synced 2025-12-17 17:34:37 -06:00
fetch: stop checking for NULL transport->remote in do_fetch()
This field will never be NULL; if it were, we'd segfault earlier in the function when we unconditionally check transport->remote->fetch_tags. Likewise, many other functions dereference it unconditionally. This is a small simplification, but it will make things easier as we extend this conditional in the next patch. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
ac8035a2af
commit
080bc4990f
@ -1626,7 +1626,7 @@ static int do_fetch(struct transport *transport,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (transport->remote && transport->remote->fetch.nr)
|
} else if (transport->remote->fetch.nr)
|
||||||
refspec_ref_prefixes(&transport->remote->fetch,
|
refspec_ref_prefixes(&transport->remote->fetch,
|
||||||
&transport_ls_refs_options.ref_prefixes);
|
&transport_ls_refs_options.ref_prefixes);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user