From: Junio C Hamano Date: Sun, 13 Mar 2022 22:56:16 +0000 (+0000) Subject: Merge branch 'ps/fetch-atomic' X-Git-Tag: v2.36.0-rc0~79 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=851d2f0ab123c8fa33bbdc8e5a325e0c8b2c5d9c;p=thirdparty%2Fgit.git Merge branch 'ps/fetch-atomic' "git fetch" can make two separate fetches, but ref updates coming from them were in two separate ref transactions under "--atomic", which has been corrected. * ps/fetch-atomic: fetch: make `--atomic` flag cover pruning of refs fetch: make `--atomic` flag cover backfilling of tags refs: add interface to iterate over queued transactional updates fetch: report errors when backfilling tags fails fetch: control lifecycle of FETCH_HEAD in a single place fetch: backfill tags before setting upstream fetch: increase test coverage of fetches --- 851d2f0ab123c8fa33bbdc8e5a325e0c8b2c5d9c diff --cc builtin/fetch.c index 95832ba1df,9a2b5c03a4..e8305b6662 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@@ -1094,14 -1115,7 +1115,10 @@@ static int store_updated_refs(const cha struct ref *rm; char *url; int want_status; - int summary_width = transport_summary_width(ref_map); + int summary_width = 0; + - rc = open_fetch_head(&fetch_head); - if (rc) - return -1; - + if (verbosity >= 0) + summary_width = transport_summary_width(ref_map); if (raw_url) url = transport_anonymize_url(raw_url); @@@ -1347,7 -1345,9 +1348,8 @@@ static int prune_refs(struct refspec *r { int url_len, i, result = 0; struct ref *ref, *stale_refs = get_stale_heads(rs, ref_map); + struct strbuf err = STRBUF_INIT; char *url; - int summary_width = transport_summary_width(stale_refs); const char *dangling_msg = dry_run ? _(" (%s will become dangling)") : _(" (%s has become dangling)");