๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #1081

Re: [PATCH v3 0/3] branch: let --delete-merged find squash merged branches

#1081
From: Harald Nordgren
Date: Wed, 21 Oct 2026 18:51
54 lines
14260 bytes
> But the false positive from my v2 report is still there. A branch that
> was never merged is deleted because another author made the same change
> in an unrelated commit. In v2 I could turn that off with --no-squashed.
> In v3 the cheap check finds it, so it happens with no option at all.
>
> That is the case Junio called "irrelevant", and he suggested that
> "--delete-merged" stay the strict "my commits are in upstream" check.
> The file contents of such a branch are in upstream, but its own commits
> and messages are not, and the user did not ask for the looser meaning.

My sincere apology for skipping over your post before.

My branch being pruned because someone else did the same thing would
indeed feel weird. And it could be stopped by doing an author check.

But I question if itโ€™s realistic at all. The code has to be exactly
the same, and I donโ€™t think I have ever seen that happen, I would call
this an extremely rare edge case.

And if it did happen and it was *incorrectly* pruned, it is still not
completely lost, because by definition it is in the upstream already.
So why would you actually need that branch? (But it wonโ€™t happen)

> So I would still prefer the whole looser check behind one opt-in, with
> a config variable for the default. The cheap check and --squashed could
> then be two levels of that one option, for example:
>
>     git branch --delete-merged origin/main --landed=files
>     git branch --delete-merged origin/main --landed=merge
>
> Users who land everything through "Squash and merge" set it once in the
> config, and plain --delete-merged keeps its current meaning.

I think this is pushing it in terms of UX mental load. I will never
run this check without specifying the highest level of pruning. I also
have another topic open to be able to skip the '**' pattern.

It's about giving users the simplest-to-use tool to work with, not
endless configurability for a command that just deletes merged
branches.

> A branch checked out in a worktree is still skipped with no message,
> while a branch with deleteMerged=false prints "Skipping". I sent an RFC
> for "git worktree list --merged" about that case:
>
>   https://lore.kernel.org/git/20261021173350.67854-1-me@jaspermayone.com/

I'll take a look at that after sending this, I haven't yet. Thanks in advance!


Harald
Technical Details
Message-ID: <CAHwyqnWnp0W17TXbXgLQPaGuwasqndgoPHV1CL3mBpfGFYadtw@mail.gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-72767-linux-kernel-git=dewy.ru
References: <pull.2425.v3.git.git.1792585717.gitgitgadget@gmail.com> <20261021173503.70887-1-me@jaspermayone.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-72767-linux-kernel-git=dewy.ru
From: haraldnordgren@gmail.com (Harald Nordgren)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH v3 0/3] branch: let --delete-merged find squash merged branches
Date: Wed, 21 Oct 2026 20:51:43 +0200
Organization: Usenet Network
Message-ID: <CAHwyqnWnp0W17TXbXgLQPaGuwasqndgoPHV1CL3mBpfGFYadtw@mail.gmail.com>
References: <pull.2425.v3.git.git.1792585717.gitgitgadget@gmail.com> <20261021173503.70887-1-me@jaspermayone.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="38188"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:f41zPcpPV1BrkAR/IgMqUub2Yvs= sha256:f3W4DfedWenYxpIZmNtqMV3WvyNVIQfbyngLSH7f04g=
	sha1:3xaLqQyvfAf46gRmg8tLrtfxDNk= sha256:PLxVufTIFrYTF7rNhGvNQSyfr7jrUEochbMWR5Hx6aU=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 9286F1110E1; Wed, 21 Oct 2026 21:55:16 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.048 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id oz4wikUEq-fR;
	Wed, 21 Oct 2026 21:55:13 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-72767-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 061E81110D8; Wed, 21 Oct 2026 21:55:04 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 6ABA230FFD; Wed, 21 Oct 2026 18:52:23 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792608743;
	b=irGBBDuFmSR1hQuCj29yFUURQgYRQEJ3po+aiRnxLL61ejgTexJ2Uvfd2zHV6G62d3Bf
	 3N59llzTcbopvsrVv+rpxeW1xN/i9Nx1K38H7z9ApuqHIF+Ye2UjGCEg8cZmenZYtGveo
	 Cv05bWWm3/jdRThF6HA8pI5YleSEdOUccWj5TyZM8AB28dqngGsUqeCnGohKVrgNYmw4p
	 gfgWfH/iNtZHDLdoGhw2YPuUSg6sHT29/XYb4e2hD+3S4vMZWost6jbimV/Rnh3mcRvJK
	 M17Ft4z9rbxIhgu7GlWYzc9Xr7F85AgBZfxhWzow9umVNyXkksViIQ4kyxELs6nVywg==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792608743;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
	 X-Gm-Gg:X-Received:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 References:In-Reply-To:From:Date:X-Gm-Features:Message-ID:Subject:To:
	 Cc:Content-Type:Content-Transfer-Encoding;
	bh=8j6kaWukO6bOyVLQDZfeiTPo6sZEqbXzcMlDaaVXCDI=;
	b=p/+5SU2wsD82b7BmvSkJrnN0Svz02WSIikyjAYvcTdG+UeR8VRZD2GW0b4oMS8YK8PUp
	 BdT0A3TNvC3Te25G7vdo+mStz8i8kEf0QEXGe4G9zLaoVCM/IN47fWg2Nr0ZrB48zDcZW
	 MppAWZuqpyw1WeDMG/YtfMm2nLXZss8gTmk6QqddWq7moHdUjnGblkwD3q42Xlw9WWbNi
	 M0TmDB4W1C7dFrh++JXx64hhKzu78o9X7/IETRCAPG/z4hL7rPkprXCMvLDgCUz6ZPH2B
	 RsbkxB19xlCUcYnOxFjUK5DP8WRzl8qotvkd3qz7E1L5RrI4mDGk9lk99uFDeoUoHog==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=K5qk31mj;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 41CE3606A324;
	Wed, 21 Oct 2026 18:52:23 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=K5qk31mj
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.208.49
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792608742;
	b=eluRD9P4CapBj4Js6+uDNd6bLVYGrDcQVuBmcSos36jrl0rYu5Po+vKiDMC1HBEzCN3/
	 +d/ZzSUSDAfUhpnyEysPgnlVFaJUh9uEOdCne089pMu5yMUBY2zDeJcWY5B2PN1fNl9GW
	 GFcVvIYV7zKddSrxn054XUxnMm86c9os9QhW6jWu9PRNH3aazWATYe7dzy8ZSuvBUafkw
	 gq+W8OdB7eEXx7Mf8Bj2h0jpxwjb0UWm9zg6OsZrVmO53WL6innJCSRGU9B4OIPsi3rgW
	 TIK2y1dtO9WIwJ32SlomF5ffQt0eo+uq2cqatK6ylDXzLLwKLk8KP4/+I0K9n345Fyg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792608742;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 MIME-Version:References:In-Reply-To:From:Date:X-Gm-Features:
	 Message-ID:Subject:To:Cc:Content-Type:Content-Transfer-Encoding;
	bh=8j6kaWukO6bOyVLQDZfeiTPo6sZEqbXzcMlDaaVXCDI=;
	b=zQY6R3kI30hVWTv2jBMamp1nAGU1oA0r9+Fvj0jsrZbElLLqgIZZCdCZMBj8b/nWMkvC
	 O2AwWUyA6Mr2N2B0CWaSstjZUqv5pSo39QS52P9wD8xtJ1y8drsGRcgYCdqJbQa8s1XU/
	 4w5iGoPAwoaEkXTHBXrQDDfq2igL4MFtc4aDsXHF1BUZdvE6dcn89xVw7sWnMwez8hZaE
	 egQzgyg3UI7y3BP9cHGstbXLfCwLacteur71AQYe1Nbke9jcxWbANPH+LL4Hu7d4xrpD0
	 BaGPlbsMnFJ/ScxHOo1fDDZdH3J84YYoJaehiBQuE2haBSreF8AOtieyQEEvCR8k2Dw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=K5qk31mj;
	arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.208.49
X-Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CDC8606A325
	for <git@vger.kernel.org>; Wed, 21 Oct 2026 18:52:21 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0CDC8606A325
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-6b413b0a974so900340a12.2
        for <git@vger.kernel.org>; Wed, 21 Oct 2026 11:52:21 -0700 (PDT)
X-ARC-Seal: i=1; a=rsa-sha256; t=1792608740; cv=none;
        d=google.com; s=arc-20260327;
        b=gwoHRosoPTspXVeQ1AVXbH+QIi947yesZ7lX9xbaZhM0bi5H+7pyD+pEEoS7j+O5Hv
         C4tHhJKSQJzQr9tkgO6lFbx4QN4rFHCZEr+lDBS8Ulif08yS16lnHfxkPY3Yegl55tOB
         oZroMif0YFCUhiXEFof3EQqlUQLH/fEt9HIoN14aOfZbHSSvaXLFqF21pi97muH7OTyl
         6sUTpx6/GjmgSFSvWS8Qqjrvst7we0bthbu21vwd8t+qMJeq9jtoIMbxZXQwTm6xcngD
         UvI0t9nIcl9xRxyYT1zkf4cBFaIY5UzGwE03rARvGvT2n/05IS9VUyPkFqcIysshiObw
         EvHg==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:dkim-signature;
        bh=8j6kaWukO6bOyVLQDZfeiTPo6sZEqbXzcMlDaaVXCDI=;
        fh=FMEmb62iD1I6L3AHBQJX5/uztIb/gwNOWIkmWzc389c=;
        b=RaeRpqHJKOFED+PUm1xqlEouYQtWDzjvK9JFZEfvIHrbRp9euRmMoXlh1d7UkNd5JP
         rVKi2CixAvECNwP/5klFMc3mOYei/OhS3jZDG2gpKTREo/wy6RaLT8X8zAMTdKSDH32t
         +tYhvfw/yUmAqL8ZJAAluwkCTavbdKSqwI3sWr6i09/vVyoAFAI3CEAcQVCNca13VgC2
         paWjeJMfRjfgayCgf4uGlS9wJpAiwWd5JKnkWEdj94BSxSbSG5kYMMR//EoLeZFWZxiV
         VqbB/DLTX9ISX60N9obJLbdEpKnbPpwce9duFPzDEuKHdmFyPN7+i/qld5a06l0813Bi
         uzIA==;
        darn=vger.kernel.org
X-ARC-Authentication-Results: i=1; mx.google.com; arc=none
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20251104; t=1792608740; x=1793213540; darn=vger.kernel.org;
        h=content-transfer-encoding:content-type:cc:to:subject:message-id
         :date:from:in-reply-to:references:mime-version:from:to:cc:subject
         :date:message-id:reply-to:content-type;
        bh=8j6kaWukO6bOyVLQDZfeiTPo6sZEqbXzcMlDaaVXCDI=;
        b=K5qk31mj2n5nmU7JZGv12GQphpR7CX4nEUkpsKaL71F3J7SQtWDPGnGYZ9a2iQ19pC
         01R5wKDOx8Xc5UaLW4uKoL7MN0u0FFeRHNzoMquV36eWRj2QDmrcuPD2whawXMmhDC/Y
         0ndPFOG35tk1vfgiyo7v4MRnHjkv6r48kTwQkvzJWWLh2PVXkBENoDgpdnx7uYEcNNmd
         o+jFpNsq7fIz+cncL/24mrnfKPD0N7MoNGbOXqpkc4b24tU2M7M8bwMmLv6CQ0YDP7+6
         aK+A1xFDnI8+xTr0LXxo3bMi6x9epMEnhPFPtEVhoHbfbX4pShbo4sCqTFoqCrXCeeFR
         5o+A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1792608740; x=1793213540;
        h=content-transfer-encoding:content-type:cc:to:subject:message-id
         :date:from:in-reply-to:references:mime-version:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=8j6kaWukO6bOyVLQDZfeiTPo6sZEqbXzcMlDaaVXCDI=;
        b=TSahXTdgqjkpUtYViKVOepawls6c79xHSbC+XIX6EXOMNLmPIg8uvn1fO1o/z7Mv6n
         XbpkOGNuXOlAySU2HNbzONoAS87zIgZhS38+XyAFHLoh6wsA89o7E+mvk+DJTiUW4GSh
         BQ1gUe7D7q9cg5YGmmuVrXe4oMzmgfkEpDQ3oTf9ddMn/kXxxyXX0ESpylpBoOtjUsh5
         hN7hfKYkAxj25xFG7KaKrzI/qqDYY3JAOVD502tEZ/YtW5ZckvfeqRUJeDC5+MDODx/2
         2TCRiKqUmtJp90oBT9bzx0OY9vOGvVg9OYJ7a6zxRmUCLL84+oYdP5ino58VL9XtMqzH
         1pTQ==
X-Forwarded-Encrypted: i=1; AKwUvBxNJ/jwazj0/5gyEvLCw7PhT0h/VWQYw8ZSsoBN76o7Otzi3EN0hUVZ/OjRJy1UCEYqYJo=@vger.kernel.org
X-Gm-Message-State: AFq9FYIDnDYe4hXe1qwnwkeXtU9h97v7At1mj6LLqZa6mCqcyE1+OlND
	FK4UAiol6afd8WopmwASsMMpsNR9jWUXZoFDxl/ycfYZEtsqs/OmT7Zmn6ng/3rUPSQd/fZpKOf
	OZgG5rr7eOPPJ2uUsWpQ0JAlLSXfSrkw=
X-Gm-Gg: AYBFou2SEZT6EJjKxJU/ngpvU0OdEfjfuvotgT4/r5cPw4mRM4mAJhnGQC434wNqJJP
	j1tA5MKI9/OLKcrol5tsGtBQxROXXOg9x2K4wR556DWs5H0W6UIurUtTStygOk8gmS2L3YrzuII
	X8crC7J12ZJrfx4gw76BVSXDzz/duZHgF87ApA6wOlAOHGPQamR2fqQN371rEFu4Bz3azfEBaUD
	ziXTJ7gzSMRWVvAMa6RkstIlGqT+Aj/FbJmNaFJMqaO7Z17ecWOhCjvqsTgDAdYGo+znKBqxmfj
	CWa+pjKW38ommQBCCXxkOBu0iltb3DQrgFPz8wYH2H9aBZ4RztWNhwS1lrKl4gyIzETxBGtKdDL
	YVB2M+ZvyvIkAdle3KZrjCvcZBOJz00jMBMa2
X-Received: by 2002:a05:6402:2751:b0:6b4:12df:3ee0 with SMTP id
 4fb4d7f45d1cf-6b412df4127mr1806094a12.34.1792608740196; Wed, 21 Oct 2026
 11:52:20 -0700 (PDT)
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261021173503.70887-1-me@jaspermayone.com>
X-Gm-Features: AclHuK_RYPGPMMS-vqHOmLF1wcD9Ep2wQQaSNLJ1SWf3o3_poTnvGlSrHZl0FK4
X-Cc: gitster@pobox.com, git@vger.kernel.org, ben.knoble@gmail.com, 
	kristofferhaugsbakk@fastmail.com, phillip.wood123@gmail.com