From: Junio C Hamano Date: Mon, 31 Jan 2022 19:20:50 GMT Subject: Re: [PATCH v2] fetch --prune: exit with error if pruning fails Message-ID: In-Reply-To: <20220131133047.1885074-1-t.gummerer@gmail.com> Thomas Gummerer writes: > diff --git a/builtin/fetch.c b/builtin/fetch.c > index 5f06b21f8e..648f0694f2 100644 > --- a/builtin/fetch.c > +++ b/builtin/fetch.c > @@ -1609,12 +1609,14 @@ static int do_fetch(struct transport *transport, > * don't care whether --tags was specified. > */ > if (rs->nr) { > - prune_refs(rs, ref_map, transport->url); > + retcode = prune_refs(rs, ref_map, transport->url); > } else { > - prune_refs(&transport->remote->fetch, > - ref_map, > - transport->url); > + retcode = prune_refs(&transport->remote->fetch, > + ref_map, > + transport->url); > } > + if (retcode != 0) > + retcode = 1; > } Looks trivially correct, even though a few style things look a bit irritating to my eyes ;-). Thanks, will queue.