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

Re: Re: bug deleting "unmerged" branch (2.12.3)

From
Philip Oakley <philipoakley@iee.org>
Date
Dec 8, 2017, 20:26 UTC
Message-ID
<582105F8768F4DA6AF4EC82888F0BFBE@PhilipOakley>
In-Reply-To
<5A25705C020000A1000292B0@gwsmtp1.uni-regensburg.de>
From: "Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de>
Show 5 quoted lines
> Hi Philip!
>
> I'm unsure what you are asking for...
>
> Ulrich
Hi Ulrich,
I was doing a retrospective follow up (of the second kind [1]).

In your initial email https://public-inbox.org/git/5A1D70FD020000A100029137@gwsmtp1.uni-regensburg.de/ you said

"I wanted to delete the temporary branch (which is of no use now), I got a message that the branch is unmerged. 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."

My retrospectives question was to find what what part of the documentation could be improved to assist fellow coders and Git users in gaining a better understanding here. I think it's an easy mistake [2] to make and that we should try to make the man pages more assistive.

I suspect that the description for the `git branch -d` needs a few more words to clarify the 'merged/unmerged' issue for those who recieve the warning message. Or maybe the git-glossary, etc. I tend to believe that most users will read some of the man pages, and would continue to do so if they are useful.

I'd welcome any feedback or suggestions you could provide. -- Philip

Show 32 quoted lines
> >>> "Philip Oakley" <philipoakley@iee.org> 04.12.17 0.30 Uhr >>>
> From: "Junio C Hamano" <gitster@pobox.com>
> > "Philip Oakley" <philipoakley@iee.org> writes:
> >
> >> I think it was that currently you are on M, and neither A nor B are
> >> ancestors (i.e. merged) of M.
> >>
> >> As Junio said:- "branch -d" protects branches that are yet to be
> >> merged to the **current branch**.
> >
> > Actually, I think people loosened this over time and removal of
> > branch X is not rejected even if the range HEAD..X is not empty, as
> > long as X is marked to integrate with/build on something else with
> > branch.X.{remote,merge} and the range X@{upstream}..X is empty.
> >
> > So the stress of "current branch" above you added is a bit of a
> > white lie.
>
> Ah, thanks. [I haven't had chance to check the code]
>
> The man page does say:
> .    -d
> .    Delete a branch. The branch must be fully merged in its upstream
> .    branch, or in HEAD if no upstream was set with --track
> .    or --set-upstream.
>
> It's whether or not Ulrich had joined the two aspects together, and if the
> doc was sufficient to help recognise the 'unmerged' issue. Ulrich?
> --
> Philip
>
>

[1] Retrospective Second Directive, section 3.4.2 of (15th Ed) Agile Processes in software engineering and extreme programming. ISBN 1628251042 (for the perspective of the retrospective..) [2] 'mistake' colloquial part of the error categories of slips lapses and mistakes : Human Error, by Reason (James, prof) ISBN 0521314194 (worthwhile)

Previous: Ulrich WindlNext: Ulrich Windl
Message 12 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.