> Le 30 nov. 2026 à 15:22, Harald Nordgren <hara…@gmail.com> a écrit :
>
>
>>
>>> diff --git a/Documentation/config/branch.adoc b/Documentation/config/branch.adoc
>>> index c2acd89c99..be9b296bda 100644
>>> --- a/Documentation/config/branch.adoc
>>> +++ b/Documentation/config/branch.adoc
>>> @@ -106,7 +106,7 @@ for details).
>>>
>>> `branch.<name>.deleteMerged`::
>>> If set to `false`, branch _<name>_ is exempt from
>>> - `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.
>>> + `git branch --delete-merged` and `--delete-integrated`. 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.
>>
>> Does the deleteMerged configuration variable affect the behavior of
>> the "--delete-integrated" option? Knowing how the feature evolved,
>> it is understandable to me, but I suspect it won't be natural for
>> mere mortals.
>>
>> Perhaps a single .deleteDone variable that governs both would be
>> more future-proof, as it anticipates that we may find other ways a
>> branch becomes "done", other than by getting merged or otherwise
>> integrated, and when that happens this variable will also deal with
>> such a new destructive operation.
>
> I thought about this some more, because I'm sketching out a
> '--delete-merged --remove-worktrees' follow-up, and realized that this
> will need to be added to two places as well, '--delete-merged' and
> '--delete-integrated'.
>
> So it seems maybe it's better to not have '--delete-integrated' as a
> separate thing? Should we unify it now when we still have the chance?
With context well paged out of my working memory, I cannot recall
the distinction between the 2 already. I *guess* one is merged and
the other is non-merge integrations (squash, rebase). But I still find that
more complex than
--delete-integrated[=merged,squashed,rebased]
where we accept more than one comma-separated modifier,
and « all » is an alias for all 3. And possibly the default if none are
specified ?
We could (later) support ^merged or -merged as negatives so that
« all,-merged » means the same as « squashed,rebased ».
And we could *maybe* shoehorn remove-worktrees there, too,
or make it a separate modifier flag.
Anyway, yes, I’m in favor of simplifying and unifying related concepts.