git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v15 0/7] branch: delete-merged

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Jun 17, 2026, 10:01 UTC
Message-ID
<f68e2a11-02a5-47b9-a01a-458eba821c37@gmail.com>
In-Reply-To
<pull.2285.v15.git.git.1781542042.gitgitgadget@gmail.com>
Hi Harald

Our SubmittingPatches documentation recommends waiting for the discussion to settle before sending a new version. When you know someone is going send more comments on a series it is a good idea to wait for them before sending a new version to avoid too much churn on the list which makes it hard for people to keep up. I'm not going to read this version in detail because I know another version will be needed but I did spot a couple of things in the summary below.

On 15/06/2026 17:47, Harald Nordgren via GitGitGadget wrote:
>   * Renamed --prune-merged to --delete-merged throughout. Not necessarily
>     final, but something to advance the discussion.
>   * --delete-merged now silently skips not-yet-merged branches instead of
>     warning.
Good
>   * --forked now accepts a bare remote name (e.g. origin) for the branch
>     origin/HEAD points at using DWIM.

The range-diff below does not show any changes to the implementation, only the Documentation and tests

>   * Initialized the delete_branches() flag locals where declared. Only force
>     stays deferred.

Not changing force sounds like a bad idea. The whole point of unpacking the flags at the start of the function is to avoid accidental regressions. Unpacking the flags into separate variables means the rest of the function does not need to know that the function arguments have changed.

Thanks
Phillip
Show 983 quoted lines
>   * delete_branches()/check_branch_commit() doc and code cleanups: redundant
>     branch NULL checks dropped, ref_array candidates = { 0 }, a BUG() for the
>     unreachable non-branch ref, and reworked --delete-merged doc wording.
>   * Broadened the --forked tests (local commits for realism, remote add -f,
>     --forked <pattern> <branch> coverage), renamed the misleading trunk
>     fixture, and replaced the misnamed detached branch with git checkout
>     --detach.
> 
> Harald Nordgren (7):
>    branch: add --forked filter for --list mode
>    branch: convert delete_branches() to a flags argument
>    branch: let delete_branches skip unmerged branches on bulk refusal
>    branch: prepare delete_branches for a bulk caller
>    branch: add --delete-merged <branch>
>    branch: add branch.<name>.deleteMerged opt-out
>    branch: add --dry-run for --delete-merged
> 
>   Documentation/config/branch.adoc |   7 +
>   Documentation/git-branch.adoc    |  43 +++-
>   builtin/branch.c                 | 184 ++++++++++++---
>   ref-filter.c                     |  70 ++++++
>   ref-filter.h                     |  10 +
>   t/t3200-branch.sh                | 387 +++++++++++++++++++++++++++++++
>   6 files changed, 673 insertions(+), 28 deletions(-)
> 
> 
> base-commit: ea97ad8d017de0c9037451a78008a0fd60abea0c
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2285%2FHaraldNordgren%2Ffetch-prune-local-branches-v15
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2285/HaraldNordgren/fetch-prune-local-branches-v15
> Pull-Request: https://github.com/git/git/pull/2285
> 
> Range-diff vs v14:
> 
>   1:  7383872f4b ! 1:  da741b5ea7 branch: add --forked filter for --list mode
>       @@ Commit message
>        
>            Add a --forked option to "git branch" list mode that lists only
>            branches whose configured upstream matches <branch>. The argument
>       -    can be a ref (e.g. "origin/main", "master") or a shell glob
>       +    can be a ref (e.g. "origin/main", "master"), a remote name like
>       +    "origin" for the branch its origin/HEAD points at, or a shell glob
>            (e.g. "origin/*"), and may be repeated to widen the filter.
>        
>            It is an ordinary list filter, so it combines with the others:
>       @@ Commit message
>            lists branches forked from origin that are already merged into
>            origin/main, and --no-merged inverts the question.
>        
>       -    This is the building block for --prune-merged, which deletes the
>       +    This is the building block for --delete-merged, which deletes the
>            listed branches once they have landed on their upstream.
>        
>            Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
>       @@ Documentation/git-branch.adoc: superproject's "origin/main", but tracks the subm
>        +`--forked <branch>`::
>        +	Only list branches whose configured upstream matches
>        +	_<branch>_. The argument can be a ref (e.g. `origin/main`,
>       -+	`master`) or a shell-style glob (e.g. `'origin/*'`). The
>       -+	option can be repeated to widen the filter. Implies `--list`.
>       ++	`master`), a remote name like `origin` for the branch its
>       ++	`origin/HEAD` points at, or a shell-style glob (e.g.
>       ++	`'origin/*'`). The option can be repeated to widen the
>       ++	filter. Implies `--list`.
>        +
>         `--points-at <object>`::
>         	Only list branches of _<object>_.
>       @@ t/t3200-branch.sh: test_expect_success 'errors if given a bad branch name' '
>        +	git -C forked-other branch foreign other-base &&
>        +
>        +	git clone forked-upstream forked &&
>       -+	git -C forked remote add other ../forked-other &&
>       -+	git -C forked fetch other &&
>       ++	git -C forked remote add -f other ../forked-other &&
>       ++	git -C forked remote set-head origin one &&
>        +	git -C forked branch local-base &&
>        +	git -C forked branch --track local-one origin/one &&
>        +	git -C forked branch --track local-two origin/two &&
>        +	git -C forked branch --track local-foreign other/foreign &&
>       -+	git -C forked branch detached &&
>       -+	git -C forked branch --track local-trunk local-base
>       ++	git -C forked branch --track local-onbase local-base &&
>       ++
>       ++	git -C forked checkout local-one &&
>       ++	test_commit -C forked --no-tag local-one-work local-one.t &&
>       ++	git -C forked checkout local-foreign &&
>       ++	test_commit -C forked --no-tag local-foreign-work local-foreign.t &&
>       ++	git -C forked checkout --detach
>        +'
>        +
>        +test_expect_success '--forked <upstream-tracking-branch> filters by upstream' '
>       @@ t/t3200-branch.sh: test_expect_success 'errors if given a bad branch name' '
>        +
>        +test_expect_success '--forked <local-branch> matches branches with local upstream' '
>        +	git -C forked branch --forked local-base --format="%(refname:short)" >actual &&
>       -+	echo local-trunk >expect &&
>       ++	echo local-onbase >expect &&
>        +	test_cmp expect actual
>        +'
>        +
>       @@ t/t3200-branch.sh: test_expect_success 'errors if given a bad branch name' '
>        +	git -C forked branch --forked local-base --forked "other/*" --format="%(refname:short)" >actual &&
>        +	cat >expect <<-\EOF &&
>        +	local-foreign
>       -+	local-trunk
>       ++	local-onbase
>        +	EOF
>        +	test_cmp expect actual
>        +'
>       @@ t/t3200-branch.sh: test_expect_success 'errors if given a bad branch name' '
>        +'
>        +
>        +test_expect_success '--forked composes with --no-merged' '
>       -+	test_when_finished "git -C forked checkout detached" &&
>       ++	test_when_finished "git -C forked checkout --detach" &&
>        +	git -C forked checkout local-one &&
>        +	test_commit -C forked local-only &&
>        +	git -C forked branch --forked "origin/*" --no-merged origin/one \
>       @@ t/t3200-branch.sh: test_expect_success 'errors if given a bad branch name' '
>        +	test_must_fail git -C forked branch --forked 2>err &&
>        +	test_grep "requires a value" err
>        +'
>       ++
>       ++test_expect_success '--forked <remote> uses the branch <remote>/HEAD points at' '
>       ++	git -C forked branch --forked origin --format="%(refname:short)" >actual &&
>       ++	echo local-one >expect &&
>       ++	test_cmp expect actual
>       ++'
>       ++
>       ++test_expect_success '--forked narrows a <pattern> argument' '
>       ++	git -C forked branch --forked "origin/*" "local-*" \
>       ++		--format="%(refname:short)" >actual &&
>       ++	cat >expect <<-\EOF &&
>       ++	local-one
>       ++	local-two
>       ++	EOF
>       ++	test_cmp expect actual
>       ++'
>        +
>         test_done
>   2:  7ef9502e01 ! 2:  91c35f10cc branch: let delete_branches warn instead of error on bulk refusal
>       @@ Metadata
>        Author: Harald Nordgren <haraldnordgren@gmail.com>
>        
>         ## Commit message ##
>       -    branch: let delete_branches warn instead of error on bulk refusal
>       +    branch: convert delete_branches() to a flags argument
>        
>       -    Add a warn-only mode to delete_branches() and check_branch_commit()
>       -    so a bulk caller can report branches that are not fully merged as a
>       -    short warning and carry on, rather than erroring with the longer
>       -    "use 'git branch -D'" advice that the plain "git branch -d" path
>       -    emits. Existing callers are unaffected.
>       +    delete_branches() and check_branch_commit() take a pair of int
>       +    booleans (force and quiet) that the next commits would grow further.
>       +    Replace them with a single "unsigned int flags" argument and an
>       +    enum, splitting the bits back into named bool locals so the body
>       +    keeps reading the same named values.
>       +
>       +    No change in behavior.
>        
>            Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
>        
>       @@ builtin/branch.c: static int branch_merged(int kind, const char *name,
>        +enum delete_branch_flags {
>        +	DELETE_BRANCH_FORCE = (1 << 0),
>        +	DELETE_BRANCH_QUIET = (1 << 1),
>       -+	DELETE_BRANCH_WARN_ONLY = (1 << 2),
>        +};
>        +
>         static int check_branch_commit(const char *branchname, const char *refname,
>       @@ builtin/branch.c: static int branch_merged(int kind, const char *name,
>        -			       int kinds, int force)
>        +			       int kinds, unsigned int flags)
>         {
>       -+	int force = flags & DELETE_BRANCH_FORCE;
>       ++	bool force = flags & DELETE_BRANCH_FORCE;
>         	struct commit *rev = lookup_commit_reference(the_repository, oid);
>         	if (!force && !rev) {
>         		error(_("couldn't look up commit object for '%s'"), refname);
>       - 		return -1;
>       - 	}
>       - 	if (!force && !branch_merged(kinds, branchname, rev, head_rev)) {
>       --		error(_("the branch '%s' is not fully merged"), branchname);
>       --		advise_if_enabled(ADVICE_FORCE_DELETE_BRANCH,
>       --				  _("If you are sure you want to delete it, "
>       --				  "run 'git branch -D %s'"), branchname);
>       -+		if (flags & DELETE_BRANCH_WARN_ONLY) {
>       -+			warning(_("the branch '%s' is not fully merged"),
>       -+				branchname);
>       -+		} else {
>       -+			error(_("the branch '%s' is not fully merged"),
>       -+			      branchname);
>       -+			advise_if_enabled(ADVICE_FORCE_DELETE_BRANCH,
>       -+					  _("If you are sure you want to delete it, "
>       -+					  "run 'git branch -D %s'"), branchname);
>       -+		}
>       - 		return -1;
>       - 	}
>       - 	return 0;
>        @@ builtin/branch.c: static void delete_branch_config(const char *branchname)
>         	strbuf_release(&buf);
>         }
>       @@ builtin/branch.c: static int delete_branches(int argc, const char **argv, int fo
>         	int i;
>         	int ret = 0;
>         	int remote_branch = 0;
>       -+	int force, quiet;
>       ++	bool force;
>       ++	bool quiet = flags & DELETE_BRANCH_QUIET;
>         	struct strbuf bname = STRBUF_INIT;
>         	enum interpret_branch_kind allowed_interpret;
>         	struct string_list refs_to_delete = STRING_LIST_INIT_DUP;
>       @@ builtin/branch.c: static int delete_branches(int argc, const char **argv, int fo
>         	branch_name_pos = strcspn(fmt, "%");
>         
>        +	force = flags & DELETE_BRANCH_FORCE;
>       -+	quiet = flags & DELETE_BRANCH_QUIET;
>        +
>         	if (!force)
>         		head_rev = lookup_commit_reference(the_repository, &head_oid);
>       @@ builtin/branch.c: static int delete_branches(int argc, const char **argv, int fo
>        +		if (!(ref_flags & (REF_ISSYMREF|REF_ISBROKEN)) &&
>         		    check_branch_commit(bname.buf, name, &oid, head_rev, kinds,
>        -					force)) {
>       --			ret = 1;
>        +					flags)) {
>       -+			if (!(flags & DELETE_BRANCH_WARN_ONLY))
>       -+				ret = 1;
>       + 			ret = 1;
>         			goto next;
>         		}
>         
>   -:  ---------- > 3:  e101dd2886 branch: let delete_branches skip unmerged branches on bulk refusal
>   3:  259113e304 ! 4:  6c3534901a branch: prepare delete_branches for a bulk caller
>       @@ Commit message
>            branch: prepare delete_branches for a bulk caller
>        
>            Teach delete_branches() two new modes for the upcoming
>       -    --prune-merged: one that asks only whether a branch is merged into
>       +    --delete-merged: one that asks only whether a branch is merged into
>            its upstream, without falling back to HEAD when there is no
>            upstream, and one that rehearses the deletions without removing any
>            ref. Existing callers keep their current behavior.
>       @@ builtin/branch.c: static int branch_merged(int kind, const char *name,
>        @@ builtin/branch.c: enum delete_branch_flags {
>         	DELETE_BRANCH_FORCE = (1 << 0),
>         	DELETE_BRANCH_QUIET = (1 << 1),
>       - 	DELETE_BRANCH_WARN_ONLY = (1 << 2),
>       + 	DELETE_BRANCH_SKIP_UNMERGED = (1 << 2),
>        +	DELETE_BRANCH_NO_HEAD_FALLBACK = (1 << 3),
>        +	DELETE_BRANCH_DRY_RUN = (1 << 4),
>         };
>         
>         static int check_branch_commit(const char *branchname, const char *refname,
>        @@ builtin/branch.c: 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;
>       + 	bool force;
>       + 	bool quiet = flags & DELETE_BRANCH_QUIET;
>       + 	bool skip_unmerged = flags & DELETE_BRANCH_SKIP_UNMERGED;
>       ++	bool dry_run = flags & DELETE_BRANCH_DRY_RUN;
>       ++	bool no_head_fallback = flags & DELETE_BRANCH_NO_HEAD_FALLBACK;
>         	struct strbuf bname = STRBUF_INIT;
>         	enum interpret_branch_kind allowed_interpret;
>         	struct string_list refs_to_delete = STRING_LIST_INIT_DUP;
>        @@ builtin/branch.c: static int delete_branches(int argc, const char **argv, int kinds,
>         
>         	force = flags & DELETE_BRANCH_FORCE;
>       - 	quiet = flags & DELETE_BRANCH_QUIET;
>       -+	dry_run = flags & DELETE_BRANCH_DRY_RUN;
>       -+	no_head_fallback = flags & DELETE_BRANCH_NO_HEAD_FALLBACK;
>         
>        -	if (!force)
>        +	if (!force && !no_head_fallback)
>   4:  9924373da0 ! 5:  5899013b8f branch: add --prune-merged <branch>
>       @@ Metadata
>        Author: Harald Nordgren <haraldnordgren@gmail.com>
>        
>         ## Commit message ##
>       -    branch: add --prune-merged <branch>
>       +    branch: add --delete-merged <branch>
>        
>       -            git branch --prune-merged <branch>...
>       +            git branch --delete-merged <branch>...
>        
>            deletes the local branches that "--forked <branch>" would list,
>            keeping only those whose tip is reachable from their configured
>       -    upstream: the work has already landed on the upstream they track,
>       +    upstream. The work has already landed on the upstream they track,
>            so the local copy is no longer needed.
>        
>       -    Reachability is read from local refs; nothing is fetched. Run
>       -    "git fetch" first if you want fresh upstream refs.
>       +    Three kinds of branches are not deleted:
>        
>       -    Three kinds of branches are spared:
>       -
>       -      * any branch checked out in any worktree;
>       -      * any branch whose upstream no longer resolves locally, since a
>       -        missing upstream is not by itself a sign of integration;
>       +      * any branch checked out in any worktree
>       +      * any branch whose upstream remote-tracking branch no longer
>       +        exists, since a missing upstream is not by itself a sign of
>       +        integration
>              * any branch whose push destination equals its upstream
>                (<branch>@{push} is the same as <branch>@{upstream}), such as
>                a local "main" that tracks and pushes to "origin/main". Right
>       -        after a pull it just looks "fully merged", so it is left
>       -        alone. Only branches that push somewhere other than their
>       -        upstream, typically topics in a fork workflow, are candidates.
>       +        after a pull it just looks "fully merged", so it is kept. Only
>       +        branches that push somewhere other than their upstream,
>       +        typically topics in a fork workflow, are candidates.
>        
>       -    Branches that are not yet merged into their upstream are reported
>       -    as a short warning and skipped, so one unmerged topic does not
>       -    abort the whole sweep.
>       +    A branch whose work is not yet merged into its upstream is silently
>       +    skipped, so one unmerged topic does not abort the whole sweep.
>        
>            Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
>        
>       @@ Documentation/git-branch.adoc: git branch (-m|-M) [<old-branch>] <new-branch>
>         git branch (-c|-C) [<old-branch>] <new-branch>
>         git branch (-d|-D) [-r] <branch-name>...
>         git branch --edit-description [<branch-name>]
>       -+git branch --prune-merged <branch>...
>       ++git branch --delete-merged <branch>...
>         
>         DESCRIPTION
>         -----------
>       @@ Documentation/git-branch.adoc: This option is only applicable in non-verbose mod
>         	Print the name of the current branch. In detached `HEAD` state,
>         	nothing is printed.
>         
>       -+`--prune-merged <branch>...`::
>       ++`--delete-merged <branch>...`::
>        +	Delete the local branches that `--forked` would list for the
>        +	given _<branch>_ arguments, but only those whose tip is
>        +	reachable from their configured upstream. In other words, the
>        +	work on the branch has already landed on the upstream it
>        +	tracks, so the local copy is no longer needed. Several
>        +	_<branch>_ patterns may be given, e.g. `git branch
>       -+	--prune-merged origin/main 'feature*'`.
>       ++	--delete-merged origin/main 'feature*'`.
>        ++
>       -+Reachability is checked against whatever the upstream refs say
>       -+locally; nothing is fetched. Run `git fetch` first if you want
>       -+the upstream refs refreshed.
>       ++A branch is not deleted when:
>        ++
>       -+A branch is left alone if any of the following holds:
>       -+its upstream no longer resolves locally; it is checked out in any
>       -+worktree; or its push destination (`<branch>@{push}`) equals its
>       -+upstream (`<branch>@{upstream}`), so it cannot be distinguished
>       -+from a freshly pulled trunk that just looks "fully merged".
>       ++--
>       ++* its upstream remote-tracking branch no longer exists,
>       ++* it is checked out in any worktree, or
>       ++* its push destination (`<branch>@{push}`) equals its upstream
>       ++  (`<branch>@{upstream}`), so it cannot be distinguished from a
>       ++  branch that just looks "fully merged" right after a pull.
>       ++--
>        ++
>       -+Branches refused by the "fully merged" safety check are listed as
>       -+warnings and skipped; pass them to `git branch -D` explicitly if
>       -+you want them gone.
>       ++A branch whose work has not yet been merged into its upstream is
>       ++silently skipped. Delete it with `git branch -D` if you want to
>       ++remove it anyway.
>        +
>         `-v`::
>         `-vv`::
>       @@ builtin/branch.c: static const char * const builtin_branch_usage[] = {
>         	N_("git branch [<options>] (-c | -C) [<old-branch>] <new-branch>"),
>         	N_("git branch [<options>] [-r | -a] [--points-at]"),
>         	N_("git branch [<options>] [-r | -a] [--format]"),
>       -+	N_("git branch [<options>] --prune-merged <branch>..."),
>       ++	N_("git branch [<options>] --delete-merged <branch>..."),
>         	NULL
>         };
>         
>       @@ builtin/branch.c: static int parse_opt_forked(const struct option *opt, const ch
>         	return 0;
>         }
>         
>       -+static int prune_merged_branches(int argc, const char **argv,
>       ++static int delete_merged_branches(int argc, const char **argv,
>        +				 int quiet)
>        +{
>        +	struct ref_store *refs = get_main_ref_store(the_repository);
>        +	struct ref_filter filter = REF_FILTER_INIT;
>       -+	struct ref_array candidates;
>       ++	struct ref_array candidates = { 0 };
>        +	struct strvec deletable = STRVEC_INIT;
>        +	int i, ret = 0;
>        +
>        +	if (!argc)
>       -+		die(_("--prune-merged requires at least one <branch>"));
>       ++		die(_("--delete-merged requires at least one <branch>"));
>        +
>        +	for (i = 0; i < argc; i++)
>        +		if (ref_filter_forked_add(&filter, argv[i]) < 0)
>        +			die(_("'%s' is not a valid branch or pattern"), argv[i]);
>        +
>        +	filter.kind = FILTER_REFS_BRANCHES;
>       -+	memset(&candidates, 0, sizeof(candidates));
>        +	filter_refs(&candidates, &filter, filter.kind);
>        +
>        +	for (i = 0; i < candidates.nr; i++) {
>       @@ builtin/branch.c: static int parse_opt_forked(const struct option *opt, const ch
>        +		const char *upstream, *push;
>        +
>        +		if (!skip_prefix(full_name, "refs/heads/", &short_name))
>       -+			continue;
>       ++			BUG("filter returned non-branch ref '%s'", full_name);
>        +		if (branch_checked_out(full_name))
>        +			continue;
>        +
>        +		branch = branch_get(short_name);
>       -+		upstream = branch ? branch_get_upstream(branch, NULL) : NULL;
>       ++		upstream = branch_get_upstream(branch, NULL);
>        +		if (!upstream || !refs_ref_exists(refs, upstream))
>        +			continue;
>       -+		push = branch ? branch_get_push(branch, NULL) : NULL;
>       ++		push = branch_get_push(branch, NULL);
>        +		if (!push || !strcmp(push, upstream))
>        +			continue;
>        +
>       @@ builtin/branch.c: static int parse_opt_forked(const struct option *opt, const ch
>        +	if (deletable.nr)
>        +		ret = delete_branches(deletable.nr, deletable.v,
>        +				      FILTER_REFS_BRANCHES,
>       -+				      DELETE_BRANCH_WARN_ONLY |
>       ++				      DELETE_BRANCH_SKIP_UNMERGED |
>        +				      DELETE_BRANCH_NO_HEAD_FALLBACK |
>        +				      (quiet ? DELETE_BRANCH_QUIET : 0));
>        +
>       @@ builtin/branch.c: int cmd_branch(int argc,
>         	/* possible actions */
>         	int delete = 0, rename = 0, copy = 0, list = 0,
>         	    unset_upstream = 0, show_current = 0, edit_description = 0;
>       -+	int prune_merged = 0;
>       ++	int delete_merged = 0;
>         	const char *new_upstream = NULL;
>         	int noncreate_actions = 0;
>         	/* possible options */
>       @@ builtin/branch.c: int cmd_branch(int argc,
>         		OPT_BOOL(0, "create-reflog", &reflog, N_("create the branch's reflog")),
>         		OPT_BOOL(0, "edit-description", &edit_description,
>         			 N_("edit the description for the branch")),
>       -+		OPT_BOOL(0, "prune-merged", &prune_merged,
>       -+			N_("delete local branches whose upstream matches <branch> and is merged")),
>       ++		OPT_BOOL(0, "delete-merged", &delete_merged,
>       ++			N_("delete local branches whose upstream matches <branch> and are merged")),
>         		OPT__FORCE(&force, N_("force creation, move/rename, deletion"), PARSE_OPT_NOCOMPLETE),
>         		OPT_MERGED(&filter, N_("print only branches that are merged")),
>         		OPT_NO_MERGED(&filter, N_("print only branches that are not merged")),
>       @@ builtin/branch.c: int cmd_branch(int argc,
>         
>         	if (!delete && !rename && !copy && !edit_description && !new_upstream &&
>        -	    !show_current && !unset_upstream && argc == 0)
>       -+	    !show_current && !unset_upstream && !prune_merged &&
>       ++	    !show_current && !unset_upstream && !delete_merged &&
>        +	    argc == 0)
>         		list = 1;
>         
>       @@ builtin/branch.c: int cmd_branch(int argc,
>         	noncreate_actions = !!delete + !!rename + !!copy + !!new_upstream +
>         			    !!show_current + !!list + !!edit_description +
>        -			    !!unset_upstream;
>       -+			    !!unset_upstream + !!prune_merged;
>       ++			    !!unset_upstream + !!delete_merged;
>         	if (noncreate_actions > 1)
>         		usage_with_options(builtin_branch_usage, options);
>         
>       @@ builtin/branch.c: int cmd_branch(int argc,
>         				      (delete > 1 ? DELETE_BRANCH_FORCE : 0) |
>         				      (quiet ? DELETE_BRANCH_QUIET : 0));
>         		goto out;
>       -+	} else if (prune_merged) {
>       -+		ret = prune_merged_branches(argc, argv, quiet);
>       ++	} else if (delete_merged) {
>       ++		ret = delete_merged_branches(argc, argv, quiet);
>        +		goto out;
>         	} else if (show_current) {
>         		print_current_branch_name();
>         		ret = 0;
>        
>         ## t/t3200-branch.sh ##
>       -@@ t/t3200-branch.sh: test_expect_success '--forked requires a value' '
>       - 	test_grep "requires a value" err
>       +@@ t/t3200-branch.sh: test_expect_success '--forked narrows a <pattern> argument' '
>       + 	test_cmp expect actual
>         '
>         
>       -+test_expect_success '--prune-merged: setup' '
>       ++test_expect_success '--delete-merged: setup' '
>        +	test_create_repo pm-upstream &&
>        +	test_commit -C pm-upstream base &&
>        +	git -C pm-upstream checkout -b next &&
>       @@ t/t3200-branch.sh: test_expect_success '--forked requires a value' '
>        +	test_create_repo pm-fork
>        +'
>        +
>       -+test_expect_success '--prune-merged deletes branches integrated into upstream' '
>       ++test_expect_success '--delete-merged deletes branches integrated into upstream' '
>        +	test_when_finished "rm -rf pm-merged" &&
>        +	git clone pm-upstream pm-merged &&
>        +	git -C pm-merged remote add fork ../pm-fork &&
>       @@ t/t3200-branch.sh: test_expect_success '--forked requires a value' '
>        +	git -C pm-merged branch two two-commit &&
>        +	git -C pm-merged branch --set-upstream-to=origin/next two &&
>        +
>       -+	git -C pm-merged branch --prune-merged "origin/*" &&
>       ++	git -C pm-merged branch --delete-merged "origin/*" &&
>        +
>        +	test_must_fail git -C pm-merged rev-parse --verify refs/heads/one &&
>        +	test_must_fail git -C pm-merged rev-parse --verify refs/heads/two
>        +'
>        +
>       -+test_expect_success '--prune-merged accepts a literal upstream' '
>       ++test_expect_success '--delete-merged accepts a literal upstream' '
>        +	test_when_finished "rm -rf pm-literal" &&
>        +	git clone pm-upstream pm-literal &&
>        +	git -C pm-literal remote add fork ../pm-fork &&
>       @@ t/t3200-branch.sh: test_expect_success '--forked requires a value' '
>        +	git -C pm-literal branch one one-commit &&
>        +	git -C pm-literal branch --set-upstream-to=origin/next one &&
>        +
>       -+	git -C pm-literal branch --prune-merged origin/next &&
>       ++	git -C pm-literal branch --delete-merged origin/next &&
>        +
>        +	test_must_fail git -C pm-literal rev-parse --verify refs/heads/one
>        +'
>        +
>       -+test_expect_success '--prune-merged unions multiple <branch> arguments' '
>       ++test_expect_success '--delete-merged unions multiple <branch> arguments' '
>        +	test_when_finished "rm -rf pm-union" &&
>        +	git clone pm-upstream pm-union &&
>        +	git -C pm-union remote add fork ../pm-fork &&
>       @@ t/t3200-branch.sh: test_expect_success '--forked requires a value' '
>        +	git -C pm-union branch --set-upstream-to=origin/main two &&
>        +	git -C pm-union checkout --detach &&
>        +
>       -+	git -C pm-union branch --prune-merged origin/next origin/main &&
>       ++	git -C pm-union branch --delete-merged origin/next origin/main &&
>        +
>        +	test_must_fail git -C pm-union rev-parse --verify refs/heads/one &&
>        +	test_must_fail git -C pm-union rev-parse --verify refs/heads/two
>        +'
>        +
>       -+test_expect_success '--prune-merged accepts a local upstream' '
>       ++test_expect_success '--delete-merged accepts a local upstream' '
>        +	test_when_finished "rm -rf pm-local" &&
>        +	git clone pm-upstream pm-local &&
>        +	git -C pm-local remote add fork ../pm-fork &&
>        +	test_config -C pm-local remote.pushDefault fork &&
>        +	test_config -C pm-local push.default current &&
>       -+	git -C pm-local checkout -b trunk &&
>       ++	git -C pm-local checkout -b mainline &&
>        +	git -C pm-local branch one one-commit &&
>       -+	git -C pm-local branch --set-upstream-to=trunk one &&
>       ++	git -C pm-local branch --set-upstream-to=mainline one &&
>        +	git -C pm-local merge --ff-only one-commit &&
>        +
>       -+	git -C pm-local branch --prune-merged trunk &&
>       ++	git -C pm-local branch --delete-merged mainline &&
>        +
>        +	test_must_fail git -C pm-local rev-parse --verify refs/heads/one
>        +'
>        +
>       -+test_expect_success '--prune-merged warns instead of erroring on un-integrated commits' '
>       ++test_expect_success '--delete-merged silently skips un-integrated commits' '
>        +	test_when_finished "rm -rf pm-unmerged" &&
>        +	git clone pm-upstream pm-unmerged &&
>        +	git -C pm-unmerged remote add fork ../pm-fork &&
>       @@ t/t3200-branch.sh: test_expect_success '--forked requires a value' '
>        +	test_commit -C pm-unmerged local-only &&
>        +	git -C pm-unmerged checkout - &&
>        +
>       -+	git -C pm-unmerged branch --prune-merged "origin/*" 2>err &&
>       -+	test_grep "not fully merged" err &&
>       -+	test_grep ! "If you are sure you want to delete it" err &&
>       ++	git -C pm-unmerged branch --delete-merged "origin/*" 2>err &&
>       ++	test_grep ! "not fully merged" err &&
>        +	git -C pm-unmerged rev-parse --verify refs/heads/wip
>        +'
>        +
>       -+test_expect_success '--prune-merged is silent about not-merged-to-HEAD' '
>       ++test_expect_success '--delete-merged is silent about not-merged-to-HEAD' '
>        +	test_when_finished "rm -rf pm-nohead" &&
>        +	git clone pm-upstream pm-nohead &&
>        +	git -C pm-nohead remote add fork ../pm-fork &&
>       @@ t/t3200-branch.sh: test_expect_success '--forked requires a value' '
>        +	git -C pm-nohead branch topic one-commit &&
>        +	git -C pm-nohead branch --set-upstream-to=origin/next topic &&
>        +
>       -+	git -C pm-nohead branch --prune-merged "origin/*" 2>err &&
>       ++	git -C pm-nohead branch --delete-merged "origin/*" 2>err &&
>        +
>        +	test_grep ! "not yet merged to HEAD" err &&
>        +	test_must_fail git -C pm-nohead rev-parse --verify refs/heads/topic
>        +'
>        +
>       -+test_expect_success '--prune-merged skips branches whose upstream is gone' '
>       ++test_expect_success '--delete-merged skips branches whose upstream is gone' '
>        +	test_when_finished "rm -rf pm-upstream-gone" &&
>        +	git clone pm-upstream pm-upstream-gone &&
>        +	git -C pm-upstream-gone remote add fork ../pm-fork &&
>       @@ t/t3200-branch.sh: test_expect_success '--forked requires a value' '
>        +	git -C pm-upstream-gone branch --set-upstream-to=origin/next one &&
>        +
>        +	git -C pm-upstream-gone update-ref -d refs/remotes/origin/next &&
>       -+	git -C pm-upstream-gone branch --prune-merged "origin/*" &&
>       ++	git -C pm-upstream-gone branch --delete-merged "origin/*" &&
>        +
>        +	git -C pm-upstream-gone rev-parse --verify refs/heads/one
>        +'
>        +
>       -+test_expect_success '--prune-merged never deletes the checked-out branch' '
>       ++test_expect_success '--delete-merged never deletes the checked-out branch' '
>        +	test_when_finished "rm -rf pm-head" &&
>        +	git clone pm-upstream pm-head &&
>        +	git -C pm-head remote add fork ../pm-fork &&
>       @@ t/t3200-branch.sh: test_expect_success '--forked requires a value' '
>        +	git -C pm-head checkout -b one one-commit &&
>        +	git -C pm-head branch --set-upstream-to=origin/next one &&
>        +
>       -+	git -C pm-head branch --prune-merged "origin/*" &&
>       ++	git -C pm-head branch --delete-merged "origin/*" &&
>        +
>        +	git -C pm-head rev-parse --verify refs/heads/one
>        +'
>        +
>       -+test_expect_success '--prune-merged spares branches that push back to their upstream' '
>       ++test_expect_success '--delete-merged spares branches that push back to their upstream' '
>        +	test_when_finished "rm -rf pm-push-eq" &&
>        +	git clone pm-upstream pm-push-eq &&
>        +	git -C pm-push-eq checkout --detach &&
>        +
>       -+	git -C pm-push-eq branch --prune-merged "origin/*" &&
>       ++	git -C pm-push-eq branch --delete-merged "origin/*" &&
>        +
>        +	git -C pm-push-eq rev-parse --verify refs/heads/main
>        +'
>        +
>       -+test_expect_success '--prune-merged spares a per-branch pushRemote==upstream remote' '
>       ++test_expect_success '--delete-merged spares a per-branch pushRemote==upstream remote' '
>        +	test_when_finished "rm -rf pm-push-branch" &&
>        +	git clone pm-upstream pm-push-branch &&
>        +	git -C pm-push-branch remote add fork ../pm-fork &&
>       @@ t/t3200-branch.sh: test_expect_success '--forked requires a value' '
>        +	test_config -C pm-push-branch branch.main.pushRemote origin &&
>        +	git -C pm-push-branch checkout --detach &&
>        +
>       -+	git -C pm-push-branch branch --prune-merged "origin/*" &&
>       ++	git -C pm-push-branch branch --delete-merged "origin/*" &&
>        +
>        +	git -C pm-push-branch rev-parse --verify refs/heads/main
>        +'
>        +
>       -+test_expect_success '--prune-merged prunes when @{push} differs from @{upstream}' '
>       ++test_expect_success '--delete-merged prunes when @{push} differs from @{upstream}' '
>        +	test_when_finished "rm -rf pm-push-diff" &&
>        +	git clone pm-upstream pm-push-diff &&
>        +	git -C pm-push-diff remote add fork ../pm-fork &&
>       @@ t/t3200-branch.sh: test_expect_success '--forked requires a value' '
>        +	git -C pm-push-diff branch --set-upstream-to=origin/next topic &&
>        +	git -C pm-push-diff checkout --detach &&
>        +
>       -+	git -C pm-push-diff branch --prune-merged "origin/*" &&
>       ++	git -C pm-push-diff branch --delete-merged "origin/*" &&
>        +
>        +	test_must_fail git -C pm-push-diff rev-parse --verify refs/heads/topic
>        +'
>        +
>       -+test_expect_success '--prune-merged requires at least one <branch>' '
>       -+	test_must_fail git -C forked branch --prune-merged 2>err &&
>       ++test_expect_success '--delete-merged requires at least one <branch>' '
>       ++	test_must_fail git -C forked branch --delete-merged 2>err &&
>        +	test_grep "requires at least one <branch>" err
>        +'
>        +
>       -+test_expect_success '--prune-merged takes positional <branch> arguments' '
>       ++test_expect_success '--delete-merged takes positional <branch> arguments' '
>        +	test_when_finished "rm -rf pm-positional" &&
>        +	git clone pm-upstream pm-positional &&
>        +	git -C pm-positional remote add fork ../pm-fork &&
>       @@ t/t3200-branch.sh: test_expect_success '--forked requires a value' '
>        +	git -C pm-positional branch --set-upstream-to=origin/main two &&
>        +	git -C pm-positional checkout --detach &&
>        +
>       -+	git -C pm-positional branch --prune-merged origin/next origin/main &&
>       ++	git -C pm-positional branch --delete-merged origin/next origin/main &&
>        +
>        +	test_must_fail git -C pm-positional rev-parse --verify refs/heads/one &&
>        +	test_must_fail git -C pm-positional rev-parse --verify refs/heads/two
>   5:  d691d5051b ! 6:  72aaca0666 branch: add branch.<name>.pruneMerged opt-out
>       @@ Metadata
>        Author: Harald Nordgren <haraldnordgren@gmail.com>
>        
>         ## Commit message ##
>       -    branch: add branch.<name>.pruneMerged opt-out
>       +    branch: add branch.<name>.deleteMerged opt-out
>        
>       -    Setting branch.<name>.pruneMerged=false exempts that branch from
>       -    "git branch --prune-merged", which is useful for a topic you want
>       +    Setting branch.<name>.deleteMerged=false exempts that branch from
>       +    "git branch --delete-merged", which is useful for a topic you want
>            to keep developing after an early round of it has been merged
>            upstream. Unless --quiet is given, each skip is reported so the
>            user knows why their topic was kept.
>       @@ Documentation/config/branch.adoc: for details).
>         	automatically added to the `format-patch` cover letter or
>         	`request-pull` summary.
>        +
>       -+`branch.<name>.pruneMerged`::
>       ++`branch.<name>.deleteMerged`::
>        +	If set to `false`, branch _<name>_ is exempt from
>       -+	`git branch --prune-merged`.  Useful for a topic branch you
>       ++	`git branch --delete-merged`.  Useful for a topic branch you
>        +	intend to develop further after an initial round has been
>        +	merged upstream.  Defaults to true.  Explicit deletion via
>        +	`git branch -d` is unaffected.
>        
>         ## Documentation/git-branch.adoc ##
>       -@@ Documentation/git-branch.adoc: the upstream refs refreshed.
>       +@@ Documentation/git-branch.adoc: A branch is not deleted when:
>         +
>       - A branch is left alone if any of the following holds:
>       - its upstream no longer resolves locally; it is checked out in any
>       --worktree; or its push destination (`<branch>@{push}`) equals its
>       -+worktree; its push destination (`<branch>@{push}`) equals its
>       - upstream (`<branch>@{upstream}`), so it cannot be distinguished
>       --from a freshly pulled trunk that just looks "fully merged".
>       -+from a freshly pulled trunk that just looks "fully merged"; or
>       -+`branch.<name>.pruneMerged` is set to `false`.
>       + --
>       + * its upstream remote-tracking branch no longer exists,
>       +-* it is checked out in any worktree, or
>       ++* it is checked out in any worktree,
>       + * its push destination (`<branch>@{push}`) equals its upstream
>       +   (`<branch>@{upstream}`), so it cannot be distinguished from a
>       +-  branch that just looks "fully merged" right after a pull.
>       ++  branch that just looks "fully merged" right after a pull, or
>       ++* `branch.<name>.deleteMerged` is set to `false`.
>       + --
>         +
>       - Branches refused by the "fully merged" safety check are listed as
>       - warnings and skipped; pass them to `git branch -D` explicitly if
>       + A branch whose work has not yet been merged into its upstream is
>        
>         ## builtin/branch.c ##
>       -@@ builtin/branch.c: static int prune_merged_branches(int argc, const char **argv,
>       +@@ builtin/branch.c: static int delete_merged_branches(int argc, const char **argv,
>         		const char *short_name;
>         		struct branch *branch;
>         		const char *upstream, *push;
>       @@ builtin/branch.c: static int prune_merged_branches(int argc, const char **argv,
>        +		int opt_out;
>         
>         		if (!skip_prefix(full_name, "refs/heads/", &short_name))
>       - 			continue;
>       -@@ builtin/branch.c: static int prune_merged_branches(int argc, const char **argv,
>       + 			BUG("filter returned non-branch ref '%s'", full_name);
>       +@@ builtin/branch.c: static int delete_merged_branches(int argc, const char **argv,
>         		if (!push || !strcmp(push, upstream))
>         			continue;
>         
>       -+		strbuf_addf(&key, "branch.%s.prunemerged", short_name);
>       ++		strbuf_addf(&key, "branch.%s.deletemerged", short_name);
>        +		if (!repo_config_get_bool(the_repository, key.buf, &opt_out) &&
>        +		    !opt_out) {
>        +			if (!quiet)
>        +				fprintf(stderr,
>       -+					_("Skipping '%s' (branch.%s.pruneMerged is false)\n"),
>       ++					_("Skipping '%s' (branch.%s.deleteMerged is false)\n"),
>        +					short_name, short_name);
>        +			strbuf_release(&key);
>        +			continue;
>       @@ builtin/branch.c: static int prune_merged_branches(int argc, const char **argv,
>         
>        
>         ## t/t3200-branch.sh ##
>       -@@ t/t3200-branch.sh: test_expect_success '--prune-merged takes positional <branch> arguments' '
>       +@@ t/t3200-branch.sh: test_expect_success '--delete-merged takes positional <branch> arguments' '
>         	test_must_fail git -C pm-positional rev-parse --verify refs/heads/two
>         '
>         
>       -+test_expect_success '--prune-merged honours branch.<name>.pruneMerged=false' '
>       ++test_expect_success '--delete-merged honours branch.<name>.deleteMerged=false' '
>        +	test_when_finished "rm -rf pm-optout" &&
>        +	git clone pm-upstream pm-optout &&
>        +	git -C pm-optout remote add fork ../pm-fork &&
>       @@ t/t3200-branch.sh: test_expect_success '--prune-merged takes positional <branch>
>        +	git -C pm-optout branch --set-upstream-to=origin/next one &&
>        +	git -C pm-optout branch two two-commit &&
>        +	git -C pm-optout branch --set-upstream-to=origin/next two &&
>       -+	test_config -C pm-optout branch.one.pruneMerged false &&
>       ++	test_config -C pm-optout branch.one.deleteMerged false &&
>        +
>       -+	git -C pm-optout branch --prune-merged "origin/*" 2>err &&
>       ++	git -C pm-optout branch --delete-merged "origin/*" 2>err &&
>        +
>        +	git -C pm-optout rev-parse --verify refs/heads/one &&
>        +	test_must_fail git -C pm-optout rev-parse --verify refs/heads/two &&
>        +	test_grep "Skipping .one." err
>        +'
>        +
>       -+test_expect_success 'branch -d still deletes a pruneMerged=false branch' '
>       ++test_expect_success 'branch -d still deletes a deleteMerged=false branch' '
>        +	test_when_finished "rm -rf pm-optout-d" &&
>        +	git clone pm-upstream pm-optout-d &&
>        +	git -C pm-optout-d branch one one-commit &&
>        +	git -C pm-optout-d branch --set-upstream-to=origin/next one &&
>       -+	test_config -C pm-optout-d branch.one.pruneMerged false &&
>       ++	test_config -C pm-optout-d branch.one.deleteMerged false &&
>        +
>        +	git -C pm-optout-d branch -d one &&
>        +	test_must_fail git -C pm-optout-d rev-parse --verify refs/heads/one
>   6:  ede8c61729 ! 7:  7b2b01b988 branch: add --dry-run for --prune-merged
>       @@ Metadata
>        Author: Harald Nordgren <haraldnordgren@gmail.com>
>        
>         ## Commit message ##
>       -    branch: add --dry-run for --prune-merged
>       +    branch: add --dry-run for --delete-merged
>        
>       -    With --dry-run, --prune-merged prints the local branches it would
>       +    With --dry-run, --delete-merged prints the local branches it would
>            delete, one "Would delete branch <name>" line each, and exits
>            without touching any ref. The same filtering applies, so the output
>            is exactly the set that the real run would delete.
>        
>       -    --dry-run is only meaningful together with --prune-merged and is
>       +    --dry-run is only meaningful together with --delete-merged and is
>            rejected otherwise.
>        
>            Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
>       @@ Documentation/git-branch.adoc: git branch (-m|-M) [<old-branch>] <new-branch>
>         git branch (-c|-C) [<old-branch>] <new-branch>
>         git branch (-d|-D) [-r] <branch-name>...
>         git branch --edit-description [<branch-name>]
>       --git branch --prune-merged <branch>...
>       -+git branch [--dry-run] --prune-merged <branch>...
>       +-git branch --delete-merged <branch>...
>       ++git branch [--dry-run] --delete-merged <branch>...
>         
>         DESCRIPTION
>         -----------
>       -@@ Documentation/git-branch.adoc: Branches refused by the "fully merged" safety check are listed as
>       - warnings and skipped; pass them to `git branch -D` explicitly if
>       - you want them gone.
>       +@@ Documentation/git-branch.adoc: A branch whose work has not yet been merged into its upstream is
>       + silently skipped. Delete it with `git branch -D` if you want to
>       + remove it anyway.
>         
>        +`--dry-run`::
>       -+	With `--prune-merged`, print which branches would be
>       ++	With `--delete-merged`, print which branches would be
>        +	deleted and exit without touching any ref.  Useful for
>        +	sanity-checking a wide pattern like `'origin/*'` before
>        +	committing to the deletion.
>       @@ builtin/branch.c
>        @@ builtin/branch.c: static int parse_opt_forked(const struct option *opt, const char *arg, int unset
>         }
>         
>       - static int prune_merged_branches(int argc, const char **argv,
>       + static int delete_merged_branches(int argc, const char **argv,
>        -				 int quiet)
>        +				 int quiet, int dry_run)
>         {
>         	struct ref_store *refs = get_main_ref_store(the_repository);
>         	struct ref_filter filter = REF_FILTER_INIT;
>       -@@ builtin/branch.c: static int prune_merged_branches(int argc, const char **argv,
>       +@@ builtin/branch.c: static int delete_merged_branches(int argc, const char **argv,
>         				      FILTER_REFS_BRANCHES,
>       - 				      DELETE_BRANCH_WARN_ONLY |
>       + 				      DELETE_BRANCH_SKIP_UNMERGED |
>         				      DELETE_BRANCH_NO_HEAD_FALLBACK |
>        -				      (quiet ? DELETE_BRANCH_QUIET : 0));
>        +				      (quiet ? DELETE_BRANCH_QUIET : 0) |
>       @@ builtin/branch.c: static int prune_merged_branches(int argc, const char **argv,
>        @@ builtin/branch.c: int cmd_branch(int argc,
>         	int delete = 0, rename = 0, copy = 0, list = 0,
>         	    unset_upstream = 0, show_current = 0, edit_description = 0;
>       - 	int prune_merged = 0;
>       + 	int delete_merged = 0;
>        +	int dry_run = 0;
>         	const char *new_upstream = NULL;
>         	int noncreate_actions = 0;
>         	/* possible options */
>        @@ builtin/branch.c: int cmd_branch(int argc,
>         			 N_("edit the description for the branch")),
>       - 		OPT_BOOL(0, "prune-merged", &prune_merged,
>       - 			N_("delete local branches whose upstream matches <branch> and is merged")),
>       + 		OPT_BOOL(0, "delete-merged", &delete_merged,
>       + 			N_("delete local branches whose upstream matches <branch> and are merged")),
>        +		OPT_BOOL(0, "dry-run", &dry_run,
>       -+			N_("with --prune-merged, only print which branches would be deleted")),
>       ++			N_("with --delete-merged, only print which branches would be deleted")),
>         		OPT__FORCE(&force, N_("force creation, move/rename, deletion"), PARSE_OPT_NOCOMPLETE),
>         		OPT_MERGED(&filter, N_("print only branches that are merged")),
>         		OPT_NO_MERGED(&filter, N_("print only branches that are not merged")),
>       @@ builtin/branch.c: int cmd_branch(int argc,
>         	if (noncreate_actions > 1)
>         		usage_with_options(builtin_branch_usage, options);
>         
>       -+	if (dry_run && !prune_merged)
>       -+		die(_("--dry-run requires --prune-merged"));
>       ++	if (dry_run && !delete_merged)
>       ++		die(_("--dry-run requires --delete-merged"));
>        +
>         	if (recurse_submodules_explicit) {
>         		if (!submodule_propagate_branches)
>       @@ builtin/branch.c: int cmd_branch(int argc,
>        @@ builtin/branch.c: int cmd_branch(int argc,
>         				      (quiet ? DELETE_BRANCH_QUIET : 0));
>         		goto out;
>       - 	} else if (prune_merged) {
>       --		ret = prune_merged_branches(argc, argv, quiet);
>       -+		ret = prune_merged_branches(argc, argv, quiet, dry_run);
>       + 	} else if (delete_merged) {
>       +-		ret = delete_merged_branches(argc, argv, quiet);
>       ++		ret = delete_merged_branches(argc, argv, quiet, dry_run);
>         		goto out;
>         	} else if (show_current) {
>         		print_current_branch_name();
>        
>         ## t/t3200-branch.sh ##
>       -@@ t/t3200-branch.sh: test_expect_success 'branch -d still deletes a pruneMerged=false branch' '
>       +@@ t/t3200-branch.sh: test_expect_success 'branch -d still deletes a deleteMerged=false branch' '
>         	test_must_fail git -C pm-optout-d rev-parse --verify refs/heads/one
>         '
>         
>       -+test_expect_success '--prune-merged --dry-run lists but does not delete' '
>       ++test_expect_success '--delete-merged --dry-run lists but does not delete' '
>        +	test_when_finished "rm -rf pm-dry" &&
>        +	git clone pm-upstream pm-dry &&
>        +	git -C pm-dry remote add fork ../pm-fork &&
>       @@ t/t3200-branch.sh: test_expect_success 'branch -d still deletes a pruneMerged=fa
>        +	git -C pm-dry branch two two-commit &&
>        +	git -C pm-dry branch --set-upstream-to=origin/next two &&
>        +
>       -+	git -C pm-dry branch --dry-run --prune-merged "origin/*" >actual &&
>       ++	git -C pm-dry branch --dry-run --delete-merged "origin/*" >actual &&
>        +	test_grep "Would delete branch one " actual &&
>        +	test_grep "Would delete branch two " actual &&
>        +
>       @@ t/t3200-branch.sh: test_expect_success 'branch -d still deletes a pruneMerged=fa
>        +	git -C pm-dry rev-parse --verify refs/heads/two
>        +'
>        +
>       -+test_expect_success '--prune-merged --dry-run only lists branches the live run would delete' '
>       ++test_expect_success '--delete-merged --dry-run only lists branches the live run would delete' '
>        +	test_when_finished "rm -rf pm-dry-mixed" &&
>        +	git clone pm-upstream pm-dry-mixed &&
>        +	git -C pm-dry-mixed remote add fork ../pm-fork &&
>       @@ t/t3200-branch.sh: test_expect_success 'branch -d still deletes a pruneMerged=fa
>        +	git -C pm-dry-mixed branch merged one-commit &&
>        +	git -C pm-dry-mixed branch --set-upstream-to=origin/next merged &&
>        +
>       -+	git -C pm-dry-mixed branch --dry-run --prune-merged "origin/*" >out &&
>       ++	git -C pm-dry-mixed branch --dry-run --delete-merged "origin/*" >out &&
>        +	test_grep "Would delete branch merged" out &&
>        +	test_grep ! "Would delete branch wip" out &&
>        +	git -C pm-dry-mixed rev-parse --verify refs/heads/wip &&
>        +	git -C pm-dry-mixed rev-parse --verify refs/heads/merged
>        +'
>        +
>       -+test_expect_success '--dry-run without --prune-merged is rejected' '
>       ++test_expect_success '--dry-run without --delete-merged is rejected' '
>        +	test_must_fail git -C forked branch --dry-run 2>err &&
>       -+	test_grep "requires --prune-merged" err
>       ++	test_grep "requires --delete-merged" err
>        +'
>        +
>         test_done
> 
Previous: Harald Nordgren via GitGitGadgetNext: Harald Nordgren
Message 168 of 292 in “fetch: add fetch.pruneLocalBranches config”
  1. fetch: add fetch.pruneLocalBranches configHarald Nordgren via GitGitGadget, May 1, 2026
  2. Junio C HamanoMay 3, 2026
  3. checkout: add --autostash option for branch switchingHarald Nordgren, May 4, 2026
  4. Junio C HamanoMay 10, 2026
  5. Johannes SixtMay 5, 2026
  6. 0/6 fetch: add fetch.pruneBranches configHarald Nordgren via GitGitGadget, May 4, 2026
  7. 1/6 branch: add --forked <remote>Harald Nordgren via GitGitGadget, May 4, 2026
  8. Kristoffer HaugsbakkMay 4, 2026
  9. 2/6 branch: let delete_branches warn instead of error on bulk refusalHarald Nordgren via GitGitGadget, May 4, 2026
  10. 3/6 branch: add --prune-merged <remote>Harald Nordgren via GitGitGadget, May 4, 2026
  11. 4/6 fetch: add --prune-mergedHarald Nordgren via GitGitGadget, May 4, 2026
  12. 5/6 branch: add branch.<name>.pruneMerged opt-outHarald Nordgren via GitGitGadget, May 4, 2026
  13. 6/6 branch: add --all-remotes flagHarald Nordgren via GitGitGadget, May 4, 2026
  14. 0/6 fetch: add fetch.pruneBranches configHarald Nordgren via GitGitGadget, May 5, 2026
  15. 1/6 branch: add --forked <remote>Harald Nordgren via GitGitGadget, May 5, 2026
  16. 2/6 branch: let delete_branches warn instead of error on bulk refusalHarald Nordgren via GitGitGadget, May 5, 2026
  17. 3/6 branch: add --prune-merged <remote>Harald Nordgren via GitGitGadget, May 5, 2026
  18. 4/6 fetch: add --prune-mergedHarald Nordgren via GitGitGadget, May 5, 2026
  19. 5/6 branch: add branch.<name>.pruneMerged opt-outHarald Nordgren via GitGitGadget, May 5, 2026
  20. 6/6 branch: add --all-remotes flagHarald Nordgren via GitGitGadget, May 5, 2026
  21. 0/6 fetch: add fetch.pruneBranches configHarald Nordgren via GitGitGadget, May 5, 2026
  22. 1/6 branch: add --forked <remote>Harald Nordgren via GitGitGadget, May 5, 2026
  23. 2/6 branch: let delete_branches warn instead of error on bulk refusalHarald Nordgren via GitGitGadget, May 5, 2026
  24. 3/6 branch: add --prune-merged <remote>Harald Nordgren via GitGitGadget, May 5, 2026
  25. 4/6 fetch: add --prune-mergedHarald Nordgren via GitGitGadget, May 5, 2026
  26. Johannes SixtMay 5, 2026
  27. fetch: add fetch.pruneLocalBranches configHarald Nordgren, May 5, 2026
  28. Junio C HamanoMay 11, 2026
  29. fetch: add fetch.pruneLocalBranches configHarald Nordgren, May 11, 2026
  30. 5/6 branch: add branch.<name>.pruneMerged opt-outHarald Nordgren via GitGitGadget, May 5, 2026
  31. 6/6 branch: add --all-remotes flagHarald Nordgren via GitGitGadget, May 5, 2026
  32. 0/6 fetch: add fetch.pruneBranches configHarald Nordgren, May 7, 2026
  33. 0/5 branch: prune-mergedHarald Nordgren via GitGitGadget, May 11, 2026
  34. 1/5 branch: add --forked <remote>Harald Nordgren via GitGitGadget, May 11, 2026
  35. 2/5 branch: let delete_branches warn instead of error on bulk refusalHarald Nordgren via GitGitGadget, May 11, 2026
  36. Junio C HamanoMay 11, 2026
  37. fetch: add fetch.pruneLocalBranches configHarald Nordgren, May 11, 2026
  38. 3/5 branch: add --prune-merged <remote>Harald Nordgren via GitGitGadget, May 11, 2026
  39. 4/5 branch: add branch.<name>.pruneMerged opt-outHarald Nordgren via GitGitGadget, May 11, 2026
  40. 5/5 branch: add --all-remotes flagHarald Nordgren via GitGitGadget, May 11, 2026
  41. 0/5 branch: prune-mergedHarald Nordgren via GitGitGadget, May 11, 2026
  42. 1/5 branch: add --forked <remote>Harald Nordgren via GitGitGadget, May 11, 2026
  43. 2/5 branch: let delete_branches warn instead of error on bulk refusalHarald Nordgren via GitGitGadget, May 11, 2026
  44. 3/5 branch: add --prune-merged <remote>Harald Nordgren via GitGitGadget, May 11, 2026
  45. 4/5 branch: add branch.<name>.pruneMerged opt-outHarald Nordgren via GitGitGadget, May 11, 2026
  46. 5/5 branch: add --all-remotes flagHarald Nordgren via GitGitGadget, May 11, 2026
  47. Junio C HamanoMay 11, 2026
  48. fetch: add fetch.pruneLocalBranches configHarald Nordgren, May 12, 2026
  49. 0/5 branch: prune-mergedHarald Nordgren via GitGitGadget, May 12, 2026
  50. 1/5 branch: add --forked <remote>Harald Nordgren via GitGitGadget, May 12, 2026
  51. 2/5 branch: let delete_branches warn instead of error on bulk refusalHarald Nordgren via GitGitGadget, May 12, 2026
  52. 3/5 branch: add --prune-merged <remote>Harald Nordgren via GitGitGadget, May 12, 2026
  53. Junio C HamanoMay 12, 2026
  54. fetch: add fetch.pruneLocalBranches configHarald Nordgren, May 12, 2026
  55. 4/5 branch: add branch.<name>.pruneMerged opt-outHarald Nordgren via GitGitGadget, May 12, 2026
  56. 5/5 branch: add --all-remotes flagHarald Nordgren via GitGitGadget, May 12, 2026
  57. 0/5 branch: prune-mergedHarald Nordgren via GitGitGadget, May 12, 2026
  58. 1/5 branch: add --forked <remote>Harald Nordgren via GitGitGadget, May 12, 2026
  59. 2/5 branch: let delete_branches warn instead of error on bulk refusalHarald Nordgren via GitGitGadget, May 12, 2026
  60. 3/5 branch: add --prune-merged <remote>Harald Nordgren via GitGitGadget, May 12, 2026
  61. 4/5 branch: add branch.<name>.pruneMerged opt-outHarald Nordgren via GitGitGadget, May 12, 2026
  62. 5/5 branch: add --all-remotes flagHarald Nordgren via GitGitGadget, May 12, 2026
  63. Junio C HamanoMay 13, 2026
  64. fetch: add fetch.pruneLocalBranches configHarald Nordgren, May 13, 2026
  65. 0/5 branch: prune-mergedHarald Nordgren via GitGitGadget, May 13, 2026
  66. 1/5 branch: add --forked <remote>Harald Nordgren via GitGitGadget, May 13, 2026
  67. 2/5 branch: let delete_branches warn instead of error on bulk refusalHarald Nordgren via GitGitGadget, May 13, 2026
  68. 4/5 branch: add branch.<name>.pruneMerged opt-outHarald Nordgren via GitGitGadget, May 13, 2026
  69. 5/5 branch: add --all-remotes flagHarald Nordgren via GitGitGadget, May 13, 2026
  70. Phillip WoodMay 18, 2026
  71. 3/5 branch: add --prune-merged <remote>Harald Nordgren via GitGitGadget, May 13, 2026
  72. Phillip WoodMay 18, 2026
  73. Phillip WoodMay 21, 2026
  74. Harald NordgrenMay 21, 2026
  75. Phillip WoodMay 22, 2026
  76. Harald NordgrenMay 22, 2026
  77. Harald NordgrenMay 21, 2026
  78. Junio C HamanoMay 21, 2026
  79. Harald NordgrenMay 18, 2026
  80. 0/4 branch: prune-mergedHarald Nordgren via GitGitGadget, May 21, 2026
  81. 1/4 branch: add --forked <branch>Harald Nordgren via GitGitGadget, May 21, 2026
  82. Junio C HamanoMay 22, 2026
  83. Johannes SixtMay 22, 2026
  84. Junio C HamanoMay 22, 2026
  85. Harald NordgrenMay 22, 2026
  86. Johannes SixtMay 22, 2026
  87. 2/4 branch: add --prune-merged <branch>Harald Nordgren via GitGitGadget, May 21, 2026
  88. Junio C HamanoMay 22, 2026
  89. Junio C HamanoMay 22, 2026
  90. Junio C HamanoMay 22, 2026
  91. Harald NordgrenMay 22, 2026
  92. Junio C HamanoMay 22, 2026
  93. Junio C HamanoMay 22, 2026
  94. 3/4 branch: add branch.<name>.pruneMerged opt-outHarald Nordgren via GitGitGadget, May 21, 2026
  95. 4/4 branch: add --dry-run for --prune-mergedHarald Nordgren via GitGitGadget, May 21, 2026
  96. 0/6 branch: prune-mergedHarald Nordgren via GitGitGadget, May 22, 2026
  97. 1/6 branch: add --forked <branch>Harald Nordgren via GitGitGadget, May 22, 2026
  98. 3/6 branch: prepare delete_branches for a bulk callerHarald Nordgren via GitGitGadget, May 22, 2026
  99. 2/6 branch: let delete_branches warn instead of error on bulk refusalHarald Nordgren via GitGitGadget, May 22, 2026
  100. 6/6 branch: add --dry-run for --prune-mergedHarald Nordgren via GitGitGadget, May 22, 2026
  101. 5/6 branch: add branch.<name>.pruneMerged opt-outHarald Nordgren via GitGitGadget, May 22, 2026
  102. 4/6 branch: add --prune-merged <branch>Harald Nordgren via GitGitGadget, May 22, 2026
  103. Phillip WoodJun 2, 2026
  104. Harald NordgrenJun 2, 2026
  105. 0/6 branch: prune-mergedHarald Nordgren via GitGitGadget, Jun 3, 2026
  106. 1/6 branch: add --forked filter for --list modeHarald Nordgren via GitGitGadget, Jun 3, 2026
  107. Phillip WoodJun 5, 2026
  108. Harald NordgrenJun 5, 2026
  109. 2/6 branch: let delete_branches warn instead of error on bulk refusalHarald Nordgren via GitGitGadget, Jun 3, 2026
  110. Phillip WoodJun 5, 2026
  111. 3/6 branch: prepare delete_branches for a bulk callerHarald Nordgren via GitGitGadget, Jun 3, 2026
  112. Phillip WoodJun 5, 2026
  113. 4/6 branch: add --prune-merged <branch>Harald Nordgren via GitGitGadget, Jun 3, 2026
  114. Phillip WoodJun 5, 2026
  115. Phillip WoodJun 5, 2026
  116. 5/6 branch: add branch.<name>.pruneMerged opt-outHarald Nordgren via GitGitGadget, Jun 3, 2026
  117. 6/6 branch: add --dry-run for --prune-mergedHarald Nordgren via GitGitGadget, Jun 3, 2026
  118. 0/6 branch: prune-mergedHarald Nordgren via GitGitGadget, Jun 5, 2026
  119. 1/6 branch: add --forked filter for --list modeHarald Nordgren via GitGitGadget, Jun 5, 2026
  120. 2/6 branch: let delete_branches warn instead of error on bulk refusalHarald Nordgren via GitGitGadget, Jun 5, 2026
  121. Junio C HamanoJun 8, 2026
  122. Harald NordgrenJun 9, 2026
  123. Junio C HamanoJun 9, 2026
  124. Harald NordgrenJun 9, 2026
  125. 3/6 branch: prepare delete_branches for a bulk callerHarald Nordgren via GitGitGadget, Jun 5, 2026
  126. 4/6 branch: add --prune-merged <branch>Harald Nordgren via GitGitGadget, Jun 5, 2026
  127. 5/6 branch: add branch.<name>.pruneMerged opt-outHarald Nordgren via GitGitGadget, Jun 5, 2026
  128. 6/6 branch: add --dry-run for --prune-mergedHarald Nordgren via GitGitGadget, Jun 5, 2026
  129. 0/6 branch: prune-mergedHarald Nordgren via GitGitGadget, Jun 9, 2026
  130. 1/6 branch: add --forked filter for --list modeHarald Nordgren via GitGitGadget, Jun 9, 2026
  131. Phillip WoodJun 15, 2026
  132. 2/6 branch: let delete_branches warn instead of error on bulk refusalHarald Nordgren via GitGitGadget, Jun 9, 2026
  133. Phillip WoodJun 9, 2026
  134. 3/6 branch: prepare delete_branches for a bulk callerHarald Nordgren via GitGitGadget, Jun 9, 2026
  135. Phillip WoodJun 15, 2026
  136. 4/6 branch: add --prune-merged <branch>Harald Nordgren via GitGitGadget, Jun 9, 2026
  137. Phillip WoodJun 15, 2026
  138. Phillip WoodJun 16, 2026
  139. Harald NordgrenJun 16, 2026
  140. Phillip WoodJun 18, 2026
  141. Junio C HamanoJun 18, 2026
  142. Phillip WoodJun 19, 2026
  143. Junio C HamanoJun 19, 2026
  144. Junio C HamanoJun 19, 2026
  145. Harald NordgrenJun 20, 2026
  146. Harald NordgrenJun 21, 2026
  147. Phillip WoodJun 22, 2026
  148. Phillip WoodJun 22, 2026
  149. Harald NordgrenJun 22, 2026
  150. Phillip WoodJun 22, 2026
  151. Harald NordgrenJun 22, 2026
  152. Phillip WoodJun 22, 2026
  153. Phillip WoodJun 22, 2026
  154. Junio C HamanoJun 22, 2026
  155. 5/6 branch: add branch.<name>.pruneMerged opt-outHarald Nordgren via GitGitGadget, Jun 9, 2026
  156. Phillip WoodJun 16, 2026
  157. 6/6 branch: add --dry-run for --prune-mergedHarald Nordgren via GitGitGadget, Jun 9, 2026
  158. Phillip WoodJun 16, 2026
  159. Harald NordgrenJun 16, 2026
  160. 0/7 branch: delete-mergedHarald Nordgren via GitGitGadget, Jun 15, 2026
  161. 1/7 branch: add --forked filter for --list modeHarald Nordgren via GitGitGadget, Jun 15, 2026
  162. 2/7 branch: convert delete_branches() to a flags argumentHarald Nordgren via GitGitGadget, Jun 15, 2026
  163. 3/7 branch: let delete_branches skip unmerged branches on bulk refusalHarald Nordgren via GitGitGadget, Jun 15, 2026
  164. 4/7 branch: prepare delete_branches for a bulk callerHarald Nordgren via GitGitGadget, Jun 15, 2026
  165. 5/7 branch: add --delete-merged <branch>Harald Nordgren via GitGitGadget, Jun 15, 2026
  166. 6/7 branch: add branch.<name>.deleteMerged opt-outHarald Nordgren via GitGitGadget, Jun 15, 2026
  167. 7/7 branch: add --dry-run for --delete-mergedHarald Nordgren via GitGitGadget, Jun 15, 2026
  168. Phillip WoodJun 17, 2026
  169. Harald NordgrenJun 17, 2026
  170. Phillip WoodJun 17, 2026
  171. Harald NordgrenJun 17, 2026
  172. Phillip WoodJun 18, 2026
  173. Harald NordgrenJun 18, 2026
  174. 0/7 branch: delete-mergedHarald Nordgren via GitGitGadget, Jun 18, 2026
  175. 1/7 branch: add --forked filter for --list modeHarald Nordgren via GitGitGadget, Jun 18, 2026
  176. 2/7 branch: convert delete_branches() to a flags argumentHarald Nordgren via GitGitGadget, Jun 18, 2026
  177. 3/7 branch: let delete_branches skip unmerged branches on bulk refusalHarald Nordgren via GitGitGadget, Jun 18, 2026
  178. 4/7 branch: prepare delete_branches for a bulk callerHarald Nordgren via GitGitGadget, Jun 18, 2026
  179. 5/7 branch: add --delete-merged <branch>Harald Nordgren via GitGitGadget, Jun 18, 2026
  180. 6/7 branch: add branch.<name>.deleteMerged opt-outHarald Nordgren via GitGitGadget, Jun 18, 2026
  181. 7/7 branch: add --dry-run for --delete-mergedHarald Nordgren via GitGitGadget, Jun 18, 2026
  182. 0/7 branch: delete-mergedHarald Nordgren via GitGitGadget, Jun 22, 2026
  183. 1/7 branch: add --forked filter for --list modeHarald Nordgren via GitGitGadget, Jun 22, 2026
  184. 2/7 branch: convert delete_branches() to a flags argumentHarald Nordgren via GitGitGadget, Jun 22, 2026
  185. 3/7 branch: let delete_branches skip unmerged branches on bulk refusalHarald Nordgren via GitGitGadget, Jun 22, 2026
  186. 4/7 branch: prepare delete_branches for a bulk callerHarald Nordgren via GitGitGadget, Jun 22, 2026
  187. 5/7 branch: add --delete-merged <branch>Harald Nordgren via GitGitGadget, Jun 22, 2026
  188. Phillip WoodJun 22, 2026
  189. 6/7 branch: add branch.<name>.deleteMerged opt-outHarald Nordgren via GitGitGadget, Jun 22, 2026
  190. 7/7 branch: add --dry-run for --delete-mergedHarald Nordgren via GitGitGadget, Jun 22, 2026
  191. 0/7 branch: delete-mergedHarald Nordgren via GitGitGadget, Jun 24, 2026
  192. 1/7 branch: add --forked filter for --list modeHarald Nordgren via GitGitGadget, Jun 24, 2026
  193. Phillip WoodJul 10, 2026
  194. Harald NordgrenJul 11, 2026
  195. 2/7 branch: convert delete_branches() to a flags argumentHarald Nordgren via GitGitGadget, Jun 24, 2026
  196. Phillip WoodJul 10, 2026
  197. Harald NordgrenJul 10, 2026
  198. Phillip WoodJul 13, 2026
  199. 3/7 branch: let delete_branches skip unmerged branches on bulk refusalHarald Nordgren via GitGitGadget, Jun 24, 2026
  200. Phillip WoodJul 10, 2026
  201. 4/7 branch: prepare delete_branches for a bulk callerHarald Nordgren via GitGitGadget, Jun 24, 2026
  202. 6/7 branch: add branch.<name>.deleteMerged opt-outHarald Nordgren via GitGitGadget, Jun 24, 2026
  203. Phillip WoodJul 13, 2026
  204. Harald NordgrenJul 13, 2026
  205. 7/7 branch: add --dry-run for --delete-mergedHarald Nordgren via GitGitGadget, Jun 24, 2026
  206. Phillip WoodJul 13, 2026
  207. Harald NordgrenJul 13, 2026
  208. 5/7 branch: add --delete-merged <branch>Harald Nordgren via GitGitGadget, Jun 24, 2026
  209. Phillip WoodJul 10, 2026
  210. Harald NordgrenJul 11, 2026
  211. Harald NordgrenJul 11, 2026
  212. Phillip WoodJul 13, 2026
  213. Phillip WoodJul 13, 2026
  214. Harald NordgrenJul 13, 2026
  215. Phillip WoodJul 14, 2026
  216. Harald NordgrenJul 14, 2026
  217. Phillip WoodJul 10, 2026
  218. 0/7 branch: delete-mergedHarald Nordgren via GitGitGadget, Jul 14, 2026
  219. 1/7 branch: add --forked filter for --list modeHarald Nordgren via GitGitGadget, Jul 14, 2026
  220. 2/7 branch: convert delete_branches() to a flags argumentHarald Nordgren via GitGitGadget, Jul 14, 2026
  221. 3/7 branch: let delete_branches skip unmerged branches on bulk refusalHarald Nordgren via GitGitGadget, Jul 14, 2026
  222. 4/7 branch: prepare delete_branches for a bulk callerHarald Nordgren via GitGitGadget, Jul 14, 2026
  223. 5/7 branch: add --delete-merged <branch>Harald Nordgren via GitGitGadget, Jul 14, 2026
  224. Junio C HamanoJul 19, 2026
  225. Harald NordgrenJul 19, 2026
  226. Junio C HamanoJul 19, 2026
  227. Phillip WoodJul 19, 2026
  228. Junio C HamanoJul 19, 2026
  229. 6/7 branch: add branch.<name>.deleteMerged opt-outHarald Nordgren via GitGitGadget, Jul 14, 2026
  230. 7/7 branch: add --dry-run for --delete-mergedHarald Nordgren via GitGitGadget, Jul 14, 2026
  231. 0/7 branch: delete-mergedHarald Nordgren via GitGitGadget, Jul 22, 2026
  232. 1/7 branch: add --forked filter for --list modeHarald Nordgren via GitGitGadget, Jul 22, 2026
  233. 2/7 branch: convert delete_branches() to a flags argumentHarald Nordgren via GitGitGadget, Jul 22, 2026
  234. 3/7 branch: let delete_branches skip unmerged branches on bulk refusalHarald Nordgren via GitGitGadget, Jul 22, 2026
  235. 4/7 branch: prepare delete_branches for a bulk callerHarald Nordgren via GitGitGadget, Jul 22, 2026
  236. 5/7 branch: add --delete-merged <branch>Harald Nordgren via GitGitGadget, Jul 22, 2026
  237. 6/7 branch: add branch.<name>.deleteMerged opt-outHarald Nordgren via GitGitGadget, Jul 22, 2026
  238. 7/7 branch: add --dry-run for --delete-mergedHarald Nordgren via GitGitGadget, Jul 22, 2026
  239. Phillip WoodJul 22, 2026
  240. Harald NordgrenJul 22, 2026
  241. 0/7 branch: delete-mergedHarald Nordgren via GitGitGadget, Jul 24, 2026
  242. 1/7 branch: add --forked filter for --list modeHarald Nordgren via GitGitGadget, Jul 24, 2026
  243. 2/7 branch: convert delete_branches() to a flags argumentHarald Nordgren via GitGitGadget, Jul 24, 2026
  244. 3/7 branch: let delete_branches skip unmerged branches on bulk refusalHarald Nordgren via GitGitGadget, Jul 24, 2026
  245. 4/7 branch: prepare delete_branches for a bulk callerHarald Nordgren via GitGitGadget, Jul 24, 2026
  246. 5/7 branch: add --delete-merged <branch>Harald Nordgren via GitGitGadget, Jul 24, 2026
  247. 6/7 branch: add branch.<name>.deleteMerged opt-outHarald Nordgren via GitGitGadget, Jul 24, 2026
  248. 7/7 branch: add --dry-run for --delete-mergedHarald Nordgren via GitGitGadget, Jul 24, 2026
  249. Junio C HamanoJul 24, 2026
  250. 0/7 branch: delete-mergedHarald Nordgren via GitGitGadget, Jul 24, 2026
  251. 1/7 branch: add --forked filter for --list modeHarald Nordgren via GitGitGadget, Jul 24, 2026
  252. Junio C HamanoJul 25, 2026
  253. 2/7 branch: convert delete_branches() to a flags argumentHarald Nordgren via GitGitGadget, Jul 24, 2026
  254. 3/7 branch: let delete_branches skip unmerged branches on bulk refusalHarald Nordgren via GitGitGadget, Jul 24, 2026
  255. 4/7 branch: prepare delete_branches for a bulk callerHarald Nordgren via GitGitGadget, Jul 24, 2026
  256. 5/7 branch: add --delete-merged <branch>Harald Nordgren via GitGitGadget, Jul 24, 2026
  257. 6/7 branch: add branch.<name>.deleteMerged opt-outHarald Nordgren via GitGitGadget, Jul 24, 2026
  258. 7/7 branch: add --dry-run for --delete-mergedHarald Nordgren via GitGitGadget, Jul 24, 2026
  259. 0/7 branch: delete-mergedHarald Nordgren via GitGitGadget, Jul 25, 2026
  260. 1/7 branch: add --forked filter for --list modeHarald Nordgren via GitGitGadget, Jul 25, 2026
  261. 2/7 branch: convert delete_branches() to a flags argumentHarald Nordgren via GitGitGadget, Jul 25, 2026
  262. 3/7 branch: let delete_branches skip unmerged branches on bulk refusalHarald Nordgren via GitGitGadget, Jul 25, 2026
  263. 4/7 branch: prepare delete_branches for a bulk callerHarald Nordgren via GitGitGadget, Jul 25, 2026
  264. 5/7 branch: add --delete-merged <branch>Harald Nordgren via GitGitGadget, Jul 25, 2026
  265. Phillip WoodJul 29, 2026
  266. Harald NordgrenJul 29, 2026
  267. Phillip WoodJul 30, 2026
  268. Harald NordgrenJul 30, 2026
  269. 6/7 branch: add branch.<name>.deleteMerged opt-outHarald Nordgren via GitGitGadget, Jul 25, 2026
  270. 7/7 branch: add --dry-run for --delete-mergedHarald Nordgren via GitGitGadget, Jul 25, 2026
  271. Junio C HamanoJul 25, 2026
  272. 0/7 branch: delete-mergedHarald Nordgren via GitGitGadget, Jul 30, 2026
  273. 1/7 branch: add --forked filter for --list modeHarald Nordgren via GitGitGadget, Jul 30, 2026
  274. 2/7 branch: convert delete_branches() to a flags argumentHarald Nordgren via GitGitGadget, Jul 30, 2026
  275. 3/7 branch: let delete_branches skip unmerged branches on bulk refusalHarald Nordgren via GitGitGadget, Jul 30, 2026
  276. 4/7 branch: prepare delete_branches for a bulk callerHarald Nordgren via GitGitGadget, Jul 30, 2026
  277. 5/7 branch: add --delete-merged <pattern>Harald Nordgren via GitGitGadget, Jul 30, 2026
  278. 6/7 branch: add branch.<name>.deleteMerged opt-outHarald Nordgren via GitGitGadget, Jul 30, 2026
  279. 7/7 branch: add --dry-run for --delete-mergedHarald Nordgren via GitGitGadget, Jul 30, 2026
  280. Phillip WoodAug 4, 2026
  281. Harald NordgrenAug 4, 2026
  282. Junio C HamanoAug 4, 2026
  283. 0/7 branch: delete-mergedHarald Nordgren via GitGitGadget, Aug 5, 2026
  284. 1/7 branch: add --forked filter for --list modeHarald Nordgren via GitGitGadget, Aug 5, 2026
  285. 3/7 branch: let delete_branches skip unmerged branches on bulk refusalHarald Nordgren via GitGitGadget, Aug 5, 2026
  286. 2/7 branch: convert delete_branches() to a flags argumentHarald Nordgren via GitGitGadget, Aug 5, 2026
  287. 4/7 branch: prepare delete_branches for a bulk callerHarald Nordgren via GitGitGadget, Aug 5, 2026
  288. 5/7 branch: add --delete-merged <pattern>Harald Nordgren via GitGitGadget, Aug 5, 2026
  289. 6/7 branch: add branch.<name>.deleteMerged opt-outHarald Nordgren via GitGitGadget, Aug 5, 2026
  290. 7/7 branch: add --dry-run for --delete-mergedHarald Nordgren via GitGitGadget, Aug 5, 2026
  291. Junio C HamanoAug 6, 2026
  292. Phillip WoodAug 7, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.