fetch: refactor `s_update_ref` to use common exit path
authorPatrick Steinhardt <redacted>
Tue, 12 Jan 2021 12:27:43 +0000 (13:27 +0100)
committerJunio C Hamano <redacted>
Tue, 12 Jan 2021 20:06:15 +0000 (12:06 -0800)
commitc45889f10453864130ccbfa45815e2f4e384ab5e
tree8ca34d83ff300d9710499d778a7a24f371bef195
parent929d044575ed4f9657074f098e3a9be410d511ef
fetch: refactor `s_update_ref` to use common exit path

The cleanup code in `s_update_ref()` is currently duplicated for both
succesful and erroneous exit paths. This commit refactors the function
to have a shared exit path for both cases to remove the duplication.

Suggested-by: Christian Couder <redacted>
Signed-off-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/fetch.c
git clone https://git.99rst.org/PROJECT