commit 1510c839e3f1402633f5652133ea013854f2d58b from: Stefan Sperling date: Fri Mar 20 18:49:54 2020 UTC really make 'got fetch' create/update references correctly in mirror mode (fixes commit fed0b873) commit - 83310ac93c89fc777a006097b06ef4f4df3a5396 commit + 1510c839e3f1402633f5652133ea013854f2d58b blob - 61b79dc726c055f64b6137fe879698ad847695f7 blob + 8f68b8f6eb2e3f063c6ad019c2d4de647a75e3f2 --- got/got.c +++ got/got.c @@ -1453,23 +1453,13 @@ cmd_fetch(int argc, char *argv[]) struct got_object_id *id = pe->data; struct got_reference *ref; char *remote_refname; - - if (remote->mirror_references) { - error = got_ref_alloc(&ref, refname, id); - if (error) - goto done; - error = got_ref_write(ref, repo); - got_ref_close(ref); - if (error) - goto done; - continue; - } error = got_object_id_str(&id_str, id); if (error) goto done; - if (strncmp("refs/tags/", refname, 10) == 0) { + if (remote->mirror_references || + strncmp("refs/tags/", refname, 10) == 0) { error = got_ref_open(&ref, repo, refname, 0); if (error) { if (error->code != GOT_ERR_NOT_REF)