From: "Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Harald Nordgren <haraldnordgren@gmail.com>
Subject: [PATCH 0/2] branch: -d protects upstream branches
Date: Tue, 25 Aug 2026 21:25:15 +0000 [thread overview]
Message-ID: <pull.2365.git.git.1787693117.gitgitgadget@gmail.com> (raw)
Protect local branches from git branch -d when a surviving branch depends on
them through a local upstream chain.
Harald Nordgren (2):
branch: move stacked branch helpers
branch: protect local upstreams from -d
Documentation/git-branch.adoc | 4 +-
builtin/branch.c | 142 +++++++++++++++++++++-------------
t/t1507-rev-parse-upstream.sh | 4 +-
t/t3200-branch.sh | 43 ++++++++++
t/t6040-tracking-info.sh | 2 +-
5 files changed, 137 insertions(+), 58 deletions(-)
base-commit: 2c3adbb2c475981e340c79fdc5e7f4f9b5d9054e
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2365%2FHaraldNordgren%2Fbranch-d-protect-stacked-upstreams-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2365/HaraldNordgren/branch-d-protect-stacked-upstreams-v1
Pull-Request: https://github.com/git/git/pull/2365
--
gitgitgadget
next reply other threads:[~2026-08-25 21:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-25 21:25 Harald Nordgren via GitGitGadget [this message]
2026-08-25 21:25 ` [PATCH 1/2] branch: move stacked branch helpers Harald Nordgren via GitGitGadget
2026-08-25 21:25 ` [PATCH 2/2] branch: protect local upstreams from -d Harald Nordgren via GitGitGadget
2026-08-25 21:59 ` Junio C Hamano
2026-08-26 6:56 ` Harald Nordgren
2026-08-26 8:46 ` Tuomas Ahola
2026-08-26 9:20 ` Harald Nordgren
2026-08-26 14:37 ` Junio C Hamano
2026-08-27 5:19 ` Elijah Newren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pull.2365.git.git.1787693117.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=haraldnordgren@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox