🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #1378

Re: [RFC] branch: delete gone-upstream branches only when proven merged into a named ref

#1378
From: "D. Ben Knoble"
Date: Sat, 24 Oct 2026 13:14
84 lines
15414 bytes
On Thu, Oct 22, 2026 at 9:44 AM Harald Nordgren
<haraldnordgren@gmail.com> wrote:
>
> > Ah, but the manual seems to contradict my (personal) "natural" reading
> > of the command: "--delete-merged" actually deletes branches whose tip
> > is reachable from their upstream (when that upstream matches the given
> > pattern). So, phooey. In this case, if "topic@{upstream}" was
> > "origin/master", though, "--delete-merged=origin/*" would work, no?
> > Incidentally, I find it a shame that GitHub's documentation encourages
> > a triangular workflow (whether or not there is a fork remote involved)
> > without talking about how to configure Git to help you: fork or not,
> > if you push to a topic branch but merge to another, it's extremely
> > handy to use push.default=current or some variant so that
> >
> > - @{upstream} is the place you'll merge
> > - @{push} is the place you push
> >
> > and suddenly "git pull [--rebase]" does the right thing, "git status"
> > (esp. with the new "status.compareBranches") can tell you where you
> > are relative to both places of interest, etc.
> >
> > IOW, "git push -u origin topic" makes upstream configuration very odd
> > in the GitHub-ish workflow!
>
> Fully agree!
>
> I would say most workflows are triangular on the underlying level,
> even if the developer is not aware of it. If you work with GitHub PRs
> or GitLab's MR, then you are engaging in a triangular workflow.
>
> I picked up some important tricks for visualizing the triangular on
> this mailing list. But most of our users are not on the mailing list.

Yep. Maybe I'll start writing a "triangular workflow" document à la
Julia's work… going on the todo list, at any rate.

> But what we can and should do is to make git itself clearer, so they
> have a chance of intuiting it. I think for example that
>
>     push.default=current
>
> should likely be the default.

IIUC, the last change in this area was controversial. I worry that
changes here now would have to get through "scar tissue" (both of Git
contributors *and* users). At any rate, it would probably want to be a
major version release, and I understand it's probably too late to
discuss flipping that in 3.0?

> And many people would have a better time with
>
>     branch.autosetupmerge=inherit
>
> which gives you upstream/master as @{u} from the beginning, and then
> you likely never abandon that if you are a regular GitHub user.

Hm. Since I mostly do

    git switch -c topic origin

or similar, I'm ok with the default (=true). With inherit, the primary
help is to folks who do

    git switch -c topic main

or something, right? But the documentation doesn't say what happens
when inherit is used with a remote-tracking branch as a starting point
(which has no upstream to copy from).

> This is also why I feel strongly about this as default
> (https://lore.kernel.org/git/pull.2458.git.git.1792437798463.gitgitgadget@gmail.com/):
>
>     status.comparebranches=@{upstream} @{push}
>
> because it's confusing to switch tracking away from your "own branch"
> to upstream/master, if that means losing the waypoint of how things
> compare against @{push}.

Yeah, I'll try and reply in that thread shortly.

-- 
D. Ben Knoble
Technical Details
Message-ID: <CALnO6CAxzo5gxpWkfjtvskTVjmWWD4oFE2QKyFMMo7JZUCkBmg@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-73140-linux-kernel-git=dewy.ru
References: <a8561fb7c2da446e7f7acc7e2a443991@donquinleone.com> <CALnO6CAsCvJRywkw0WpO1nEhL+yU2-r_4Z2AHdJch1m=NK8=TA@mail.gmail.com> <CAHwyqnWi3MCvAw-sNrn6k3ht1tpUfmNg18BAvEThKthen5Dwmw@mail.gmail.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-73140-linux-kernel-git=dewy.ru
From: ben.knoble@gmail.com ("D. Ben Knoble")
Newsgroups: linux.kernel.git
Subject: Re: [RFC] branch: delete gone-upstream branches only when proven
 merged into a named ref
Date: Sat, 24 Oct 2026 09:14:21 -0400
Organization: Usenet Network
Message-ID: <CALnO6CAxzo5gxpWkfjtvskTVjmWWD4oFE2QKyFMMo7JZUCkBmg@mail.gmail.com>
References: <a8561fb7c2da446e7f7acc7e2a443991@donquinleone.com>
 <CALnO6CAsCvJRywkw0WpO1nEhL+yU2-r_4Z2AHdJch1m=NK8=TA@mail.gmail.com> <CAHwyqnWi3MCvAw-sNrn6k3ht1tpUfmNg18BAvEThKthen5Dwmw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="761709"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:bAZekJwSjgB8yQEz3qISp6WxQsw= sha256:NhcmvLlDlArzjGkWEsu8ReTgx/4d39YqmN5SURE6j2Q=
	sha1:ZHBaHa/my3lFFEPbEA6QDEh7w5o= sha256:hlEqNhs/nAtjNyB40MgZsVXc0nwRdcUfJlDTcF6AYSg=
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 AC190111639; Sat, 24 Oct 2026 16:16:39 +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 3NRo3oRBa2OW;
	Sat, 24 Oct 2026 16:16:30 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-73140-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 CE5D91115EE; Sat, 24 Oct 2026 16:16:20 +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 AE97B2E821; Sat, 24 Oct 2026 13:14:35 +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=1792847675;
	b=4Q9x6nDRpTAysXRCT39CtcZWDhqt+VYp8nrpAB38EMnWiwflrmDOyZKjy2W2xWtaiVpU
	 KLNPibNZT2Wq8WZ7/jTBhVYjwZWUZxDXwFhQSzbmf2GfgWQuMqPZC5p+gUx7FnV0+PYLv
	 tHcuQ1Xe3Cr9a2U4M9HZeMKtUeOpOyh8B8NZTGxNu+fBg2ZRZdn/d+8KjbU6fhi6Xo9tE
	 QdMAzG/EaPnvCw/P5FqFOS7IutuK/LvkzGBvKnM7Q1n9iwpjXpilzX0ECio/g2MC2dchA
	 sGmLE/5nnji0qEcM6YZ0eoWdSb0wAWgXuAqLwLdYh5gNFTQp+19NU6JjoTTEzXbAEzg==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792847675;
	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=J6n2LZoZ4jPa5oCujNkvGP2tFpnGafCWTHjkJ/lmQ5c=;
	b=zj7ElFcQMr8h8DupybI2GPie1MTaOYbEZXLwkAFIcIus7scjFW8ugMhOC8S6FELnxz63
	 GTvsp5GKAHWQYRIpm9ZkQl1LGqVxLdLWm646LTV3J3F8Y917S2jYVuwzdgtpsIlWQZJX2
	 oqlHivHInX1V1W0JsdbEim9HpQ4yNW3aZLOR15jmjiwEjPmnquyYzFbJhtaXC+ksuWECN
	 qepfqMaIFA3Pbd9NXDb7mbJUR6oOe+eB9XiLrW+Sy1+Nl4fzn8TuzBp5nPrKJaxgIhN7V
	 dsKJCsdzhf7aMR1j2yYwKpYyugVMJe+ZyU1blnyqvEVsrUUPHTyRwpM4uEpitsOVHnw==
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=Glm4jcVa;
	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 83C4A606A31B;
	Sat, 24 Oct 2026 13:14:35 +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=Glm4jcVa
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.214.173
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792847674;
	b=yzBwmO8OOEOQ9+ZdvpOKIPqrwJvA2ky/EOdZK7qdGOMqx70mskeEbTwmSVbL2unjlSlF
	 2RlK9lAt92LdAjRN4Is8OSl+frQ0XyJi/warrUq/MW5MABQ2pXoA7def7NjgKEWaEYkLz
	 bIk5jj6JP3uYQRGcI4EuIrPigZh0feRcZkHhBsC73S2+iu5mAX2AkEQnRq7fwOsy0qbdp
	 QoQNv5SUNI0+hANYyqfMxkUUTu7AH9QZAL5qIWBvQpwSaIItprZz8V331lqbApS5ZSSTq
	 arASeDCB117VFG8HnmkSdWwS4Qwc7ckBawLf/jXeW/NDGFXlR//EOPfCJzLhLBuIZKw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792847674;
	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=J6n2LZoZ4jPa5oCujNkvGP2tFpnGafCWTHjkJ/lmQ5c=;
	b=A0f/Ty9SpwI9883g1pizBmlShoTBbAzt2OgxXeWhdXo3R0Qp+dR30owkzVPb3M0OEuze
	 SRLMtGo8BlrOBxEugsUVa14XSZqX84B8vq4YsFQAZGnpPuJZaJe5wdNtPRmYpXZQLhqyp
	 il+8q9sLUrqzAzJKiyWq5qssUD04sW9+Jfjk2bN0KPGtcW1N5AnnrqmK+nwXXjTLbN+My
	 kdzftEkYzIZ73GOHeiGaTSvqZr6k0o18xEuEfMDWAWsAf0XJiX756NOLd4YbiTxEdhXDh
	 BJPGzQUOTK9T10q+djoC7oZj3uRjeFm17hbLLXO55WjpvD9wuXDk7TY0vTat2r7Ms3g==
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=Glm4jcVa;
	arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.214.173
X-Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173])
	(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 4E6BF606A328
	for <git@vger.kernel.org>; Sat, 24 Oct 2026 13:14:34 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4E6BF606A328
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-pl1-f173.google.com with SMTP id d9443c01a7336-2e9f6a16aedso10863645ad.2
        for <git@vger.kernel.org>; Sat, 24 Oct 2026 06:14:34 -0700 (PDT)
X-ARC-Seal: i=1; a=rsa-sha256; t=1792847674; cv=none;
        d=google.com; s=arc-20260327;
        b=L+e3czgxAEt0jHBshetgXee0QybgiDkIk4yzPsBDIgek01CeyaYZYdgDmhPBvLyYAt
         dgM5bwObH86uhKsRKro8vHRTgpQUAKmh8FlNWFj178SA6r0+dOJp4XpybD7ssmWdzCnc
         FPixOPZ5a35TeXt6uCGtp7UJBjScwkve7+V5brVsAdzW2h3a/qg+ybC+ZOqRLOZ0CE0G
         XuPH+NyrXNiaQOhHu5Pv8xNzmOscwy8fgs4tik9l017pfWEgDmByAMeVoO0qeNYVVsjw
         pnkpamDEcmAg4gtkRyLRu7agoeLYzR1h1RGvq4051c4vXmMlQv7hqkqi5lQEl9wiCS4B
         dAdw==
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=J6n2LZoZ4jPa5oCujNkvGP2tFpnGafCWTHjkJ/lmQ5c=;
        fh=jWbg78oYWuv9P20kCidMJL0drbkR2iYzmHqtdZIZ8Ls=;
        b=OYg5rmkaGjnG+WmA2I/3ZEmqVXlarwMsonUkciXY5yqWkhweFiB9WMjEA8gkAVPt9d
         TikeieUVVorwbW7lR/VODMeECcE7sXMt1B6vTTbGkssDxRBFDih7mJcZuAjBUfbzOjy1
         Q6CoCQdzvDE+fONn6L/mMI3GV9l7bQBLPj2E4wMFd3i4hzXfz+sGLHfnT5qmPTfAljsJ
         47UWOAWqFPyYEFkDKlANB9/juopXFCY97PfAuzgnqx8G9M0SBF8PXg8/5KeIOGJ7fifz
         c5Uwd81Zl+L0ZPi0r+HvCvlISwfTJ7Hj0Ze/AWzGy/EdWJQrarNKZ9pdUtVEpT3inzRw
         iksg==;
        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=1792847674; x=1793452474; 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=J6n2LZoZ4jPa5oCujNkvGP2tFpnGafCWTHjkJ/lmQ5c=;
        b=Glm4jcVazJn3lJ8AClaQu1iagzTb2FL3C1MwLUKQDm8d48RHOvFhPQSqQ84ehMm1Vr
         vwg5DiIlTHl99EOktIeBA34rbgNgnec9DXUbsiCbFed7B/iTMiJ/Pq2KX8ROB55J59h5
         /V12/g4+xwRdZEwI1OdPge/y6RMWZxTQorySFcStDiqCPvWmJlR/A2JXEcXr8W9sWZlT
         WXYnFQtyscYCev42ZR0hIXdM+hcgFNWH7AxtN1UztCYzwuvx1Uq+UjGWDznuXg5+JKFo
         2cX2aKauphiwhtM7UNRcu5FI1y4qhgIVMWHatP/V/mj4YaBogMBOyaWKmhUsSZ4AWb6I
         VteA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1792847674; x=1793452474;
        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=J6n2LZoZ4jPa5oCujNkvGP2tFpnGafCWTHjkJ/lmQ5c=;
        b=KokZ9W2LOVFSH2GMA9j0RBoBRhvnG4oAvBcyhiwq2Ik4IFS+r87I+YjbcNxH/Xhiy2
         5t51uQba+gMO80ocUpSnWCAVmhLMGt+JSAUVOY5pTR8B2w8LiD7VCjfpZ9ATrqQCYKkN
         eaIoLUveb8bXAwIklIiMh6Ju+2DDgmn0V/+ir7izl+8YH3/T4DsBsjMIodT6GVY5+2nl
         /f2KOE0MCT1cbNLoIsohHSMbtKjGCvbXYD0SRzRrDriPDRtz7xYJnrIrKrdIi111x26J
         oiaFGYvVlilzM1rpbC6uLhEjFw0BSM7LmzNncZECb4bEb4xz7RPVqmO25gbzKGOFltX2
         kwYg==
X-Forwarded-Encrypted: i=1; AKwUvBzJzVnxNhTZqacI2Bberr0eLB4moloKo9USJt+tGY/C35IipFpSfViDefIxHxqST1Ai8dY=@vger.kernel.org
X-Gm-Message-State: AFq9FYLupPRgAlpO2BI/NB3vZ8lFgX1f+zbFXFBOVWzFvMxXeNqe1AAo
	3z8KPtO1czo4WKKxYNcKl0kf9a+Kb1pjduIOwCfxr9QPn3YYyxBYUbXgWvA2ktje4uAoHfY9JX9
	NWMmojIpIXiORlNM5Na/Yy2ij1ZhGJVU=
X-Gm-Gg: AYBFou3qiJPBfF/wmr71QCBHMgwJTexD6288o+CPsrtpHgEd5tD8DXGcylve8hq9zD4
	h/V5/xORPN5wm+FDMiddOJu3gRMvBVO0a5f91keA1KdvNCe6iQeDRvDM/v0R5t/KSfkWAG/hwGg
	J06nmLJ4TzHr39OeKJIwM05LYBpjPajHezzNHu+E8Hj6FS4lHAXRd3v2u9POVr1/nOUvcAozW6V
	nJaFVkpmMvXDw1fEW1d4OhyZP4BmG8lyJbnzTURFD3BPmwBJz/yCgRLUIpq7nwy9DECEXkhZn8p
	6HoghkeGjXiEEQCbvOHcfBNw1gxddO3uuhcXRgDuHQclKm0u0aZ/qagzGz918FTh9MGUNX726iC
	Ig7w8k+cp/FC7nji7qnF4+9Qb1PYGEdWKJGNIfV6KxdX3qoNqQUsj+yx+fSUFzHv19A174kadBP
	R6BXVyEm2dsHcaVsDKUGWPie+8KI8fcIKTllaiY+zpJSn8LLfp61vi
X-Received: by 2002:a17:903:1b4c:b0:2ea:8442:db73 with SMTP id
 d9443c01a7336-2ea9c7ffa6dmr15007735ad.40.1792847673545; Sat, 24 Oct 2026
 06:14:33 -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: <CAHwyqnWi3MCvAw-sNrn6k3ht1tpUfmNg18BAvEThKthen5Dwmw@mail.gmail.com>
X-Gm-Features: AclHuK8NvIR89RhP6nHnx4mnbVPEBdkkAL6_peYHd-DsbnTNxGucY-13Xqv07PY
X-Cc: DonQuinleone <don@donquinleone.com>, git@vger.kernel.org, 
	Junio C Hamano <gitster@pobox.com>, Phillip Wood <phillip.wood123@gmail.com>