From: Phillip Wood Date: Mon, 15 Jun 2026 09:47:01 GMT Subject: Re: [PATCH v14 3/6] branch: prepare delete_branches for a bulk caller Message-ID: <3b04055c-846d-4aaa-99bb-5da932172f75@gmail.com> In-Reply-To: <259113e304c4085c2bd90cce3a40c965744d5a00.1780999917.git.gitgitgadget@gmail.com> Hi Harald On 09/06/2026 11:11, Harald Nordgren via GitGitGadget wrote: > > @@ -240,7 +245,7 @@ static int delete_branches(int argc, const char **argv, int kinds, > int i; > int ret = 0; > int remote_branch = 0; > - int force, quiet; > + int force, quiet, dry_run, no_head_fallback; As with the previous patch it would be safer to initialize the new variables where they are declared. > for_each_string_list_item(item, &refs_to_delete) { > char *describe_ref = item->util; > char *name = item->string; > - if (!refs_ref_exists(get_main_ref_store(the_repository), name)) { > + if (dry_run) { > + if (!quiet) > + printf(remote_branch > + ? _("Would delete remote-tracking branch %s (was %s).\n") > + : _("Would delete branch %s (was %s).\n"), I wondered what the "was %s" was about but it prints the symref target or oid of the ref. Thanks Phillip > + name + branch_name_pos, describe_ref); > + } else if (!refs_ref_exists(get_main_ref_store(the_repository), name)) { > char *refname = name + branch_name_pos; > if (!quiet) > printf(remote_branch