git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] branch: protect local upstreams from -d

From
Harald Nordgren <haraldnordgren@gmail.com>
Date
Aug 26, 2026, 09:20 UTC
Message-ID
<CAHwyqnXbzWCfVR0k=UskRDNNdPQnBEZRA+4r+kYbjT9J5K9OeA@mail.gmail.com>
In-Reply-To
<20260826084641.tb2NX%taahol@utu.fi>
Show 11 quoted lines
> } Do we also need the same safety around "git branch -d feature1" by
> } the way?  The "-d" option with safety checks the same "is feature1
> } already merged (to its upstream)?" condition, so it can protect the
> } feature2 branch the same way, by saying either "oops, you cannot
> } delete feature1 because you still have other branches like feature2
> } that depend on it", or "ok, featur2 used to depend on feature1, but
> } because we are deleting feature1 based on it being in origin/master,
> } we will make feature2 depend on origin/master from now on".
> }
>
> Harald, perhaps that's the passage you thought of?
Yes, exactly. Thanks for finding it!
Harald
Previous: Tuomas AholaNext: Junio C Hamano
Message 7 of 9 in “branch: -d protects upstream branches”
  1. 0/2 branch: -d protects upstream branchesHarald Nordgren via GitGitGadget, Aug 25, 2026
  2. 1/2 branch: move stacked branch helpersHarald Nordgren via GitGitGadget, Aug 25, 2026
  3. 2/2 branch: protect local upstreams from -dHarald Nordgren via GitGitGadget, Aug 25, 2026
  4. Junio C HamanoAug 25, 2026
  5. Harald NordgrenAug 26, 2026
  6. Tuomas AholaAug 26, 2026
  7. Harald NordgrenAug 26, 2026
  8. Junio C HamanoAug 26, 2026
  9. Elijah NewrenAug 27, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.