Re: [PATCH v8 3/4] worktree add: add --orphan flag
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 15, 2023, 03:49 UTC
- Message-ID
- <xmqq8ri4ihjg.fsf@gitster.g>
- In-Reply-To
- <013701d92893$3fad5d10$bf081730$@nexbridge.com>
<rsbecker@nexbridge.com> writes:
> I am wondering whether --detached is a more semantically consistent option. While --orphan has meaning in checkout (not one I ever liked), detached makes more sense as a description of what is intended here - as in not connected.
An orphan is not even detached, if I understand correctly.
The state is what is called "being on an unborn branch", where your HEAD does not even point at any commit. HEAD only knows a name of a branch that is not yet created but will be when you make a commit.
While "(HEAD) being detached" means that you are on an existing commit---it is just that future history you extend by making a commit from that state will not be on any branch.
So if we wanted to fix the misnomer, s/orphan/unborn/ would be how I would go about it.