Subject: Re: [PATCH v10 2/4] branch: add --prune-merged <branch>

From: Junio C Hamano <[email-masked]>
Date: Fri, 22 May 2026 10:17:22 +0900

"Harald Nordgren via GitGitGadget" <[email-masked]> writes:

> +`--prune-merged`::
> +	Delete the local branches that `--forked` would list for
> +	the same _<branch>_ arguments, but only those whose tip is
> +	reachable from their configured upstream.
> ++
> +For arguments that refer to remote-tracking branches, run
> +`git fetch` first ...

Please don't.  

"git branch -d <derived>" checks if <derived> has already been
merged to its <upstream> as your repository currently sees it, and
this makes "--prune-merged" inconsistent.  Before deciding to use
"--prune-merged", the user may have sanity checked if it is safe to
remove by running "git branch -no-merged", whose answer hence user's
sanity checking will be invalidated by your auto-update from the
upstream.

It also means that you cannot prune already merged ones while you
are not online.