Re: [PATCH v18 3/7] branch: let delete_branches skip unmerged branches on bulk refusal
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Jul 10, 2026, 15:18 UTC
- Message-ID
- <97554903-95b2-4b50-9c60-d13edca77e5e@gmail.com>
- In-Reply-To
- <a0fd5b4a6c1b9d7823b431be703ee1696ea41f6c.1782338106.git.gitgitgadget@gmail.com>
Hi Harald
On 24/06/2026 22:55, Harald Nordgren via GitGitGadget wrote:
Show 7 quoted lines
> From: Harald Nordgren <haraldnordgren@gmail.com> > > @@ -235,6 +240,7 @@ static int delete_branches(int argc, const char **argv, int kinds, > int remote_branch = 0; > bool force; > bool quiet = flags & DELETE_BRANCH_QUIET; > + bool skip_unmerged = flags & DELETE_BRANCH_SKIP_UNMERGED;
The same as the last patch and for the next patch - as we're modifying flags lets keep it as the single source of truth.
Thanks
Phillip
Show 13 quoted lines
> struct strbuf bname = STRBUF_INIT;
> enum interpret_branch_kind allowed_interpret;
> struct string_list refs_to_delete = STRING_LIST_INIT_DUP;
> @@ -319,7 +325,8 @@ static int delete_branches(int argc, const char **argv, int kinds,
> if (!(ref_flags & (REF_ISSYMREF|REF_ISBROKEN)) &&
> check_branch_commit(bname.buf, name, &oid, head_rev, kinds,
> flags)) {
> - ret = 1;
> + if (!skip_unmerged)
> + ret = 1;
> goto next;
> }
>