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

Re: bug deleting "unmerged" branch (2.12.3)

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 28, 2017, 15:32 UTC
Message-ID
<alpine.DEB.2.21.1.1711281542400.6482@virtualbox>
In-Reply-To
<5A1D70FD020000A100029137@gwsmtp1.uni-regensburg.de>
Hi Ulrich,
On Tue, 28 Nov 2017, Ulrich Windl wrote:
Show 12 quoted lines
> During a rebase that turned out to be heavier than expected 8-( I
> decided to keep the old branch by creating a temporary branch name to
> the commit of the branch to rebase (which was still the old commit ID at
> that time).
>
> When done rebasing, I attached a new name to the new (rebased) branch,
> deleted the old name (pointing at the same rebase commit), then
> recreated the old branch from the temporary branch name (created to
> remember the commit id).
>
> When I wanted to delete the temporary branch (which is of no use now), I
> got a message that the branch is unmerged.

This is actually as designed, at least for performance reasons (it is not exactly cheap to figure out whether a given commit is contained in any other branch).

> I think if more than one branches are pointing to the same commit, one
> should be allowed to delete all but the last one without warning. Do you
> agree?

No, respectfully disagree, because I have found myself with branches pointing to the same commit, even if the branches served different purposes. I really like the current behavior where you can delete a branch with `git branch -d` as long as it is contained in its upstream branch.

Ciao, Johannes

Previous: Ulrich WindlNext: Ulrich Windl
Message 2 of 14 in “bug deleting "unmerged" branch (2.12.3)”
  1. Ulrich WindlNov 28, 2017
  2. Johannes SchindelinNov 28, 2017
  3. Antw: Re: bug deleting "unmerged" branch (2.12.3)Ulrich Windl, Nov 29, 2017
  4. Johannes SchindelinNov 29, 2017
  5. Philip OakleyDec 2, 2017
  6. Junio C HamanoNov 29, 2017
  7. Antw: Re: bug deleting "unmerged" branch (2.12.3)Ulrich Windl, Nov 29, 2017
  8. Philip OakleyDec 2, 2017
  9. Junio C HamanoDec 3, 2017
  10. Philip OakleyDec 3, 2017
  11. Antw: Re: bug deleting "unmerged" branch (2.12.3)Ulrich Windl, Dec 4, 2017
  12. Philip OakleyDec 8, 2017
  13. Antw: Re: Re: bug deleting "unmerged" branch (2.12.3)Ulrich Windl, Dec 11, 2017
  14. Philip OakleyDec 12, 2017

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.