fetch: use goto cleanup in cmd_fetch()
commitbec587d4c11e851c1e7b5ed7890d627c8346d1cb
authorGlen Choo <chooglen@google.com>
Wed, 19 Jan 2022 00:00:54 +0000 (18 16:00 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 19 Jan 2022 00:22:53 +0000 (18 16:22 -0800)
treec64617402e4eda21771b4c10b0ee4765732866b4
parent69a9c10c95e28df457e33b3c7400b16caf2e2962
fetch: use goto cleanup in cmd_fetch()

Replace an early return with 'goto cleanup' in cmd_fetch() so that the
string_list is always cleared (the string_list_clear() call is purely
cleanup; the string_list is not reused). This makes cleanup consistent
so that a subsequent commit can use 'goto cleanup' to bail out early.

Signed-off-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c