[PATCH] fetch: add fetch.pruneLocalBranches config
- From
Harald Nordgren <haraldnordgren@gmail.com>
- Date
- May 11, 2026, 08:44 UTC
- Message-ID
- <20260511084436.76336-1-haraldnordgren@gmail.com>
- In-Reply-To
- <xmqq7bpas6k0.fsf@gitster.g>
Show 6 quoted lines
> Existing call sites are about "branch -d <other>" that allows the > other branch to be deleted if it is part of HEAD or if it is part of > its tracking branch, but should "branch --prune-merged" pay > attention to what branch happens to be checked out the same way (not > a rherotical question to hint that I do not think it should---I do > not have a strong opinion on this either way)?
This is a very good question! My opion is that it should work the same way regardless of which branch you are on, it should always compare against the remote's default branch.
I this explains some weirdness I saw today when running it from non-main and prune didn't get triggered.
I will look into making that change.
Harald