Re: [PATCH v4 1/4] worktree: improve message when creating a new worktree
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 19, 2018, 18:09 UTC
- Message-ID
- <xmqqpo40uebt.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CACsJy8DvUB7Sv6m384ccgDPnMnFfD80W5EZ=Pbkj8cyhFO_OqA@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 8 quoted lines
>> @@ -320,10 +318,19 @@ static int add_worktree(const char *path, const char *refname,
>> if (ret)
>> goto done;
>>
>> + fprintf(stderr, _("worktree HEAD is now at %s"),
>
> We use the term "working tree" for UI and documents. "worktree" is
> only used in code comments and stuff.Hmph, that is a bit different from what I recall. "working tree" is the phrase we have used and we still use to refer to those things that are checked out (as opposed to the in-repo data). We say "worktree" when we want to stress the fact that we are talking about a single instance among possibly multiple instances of the "working tree" that are associated to a single repository.
Technically speaking, the traditional "working tree" is everything in the directory immediately above ".git/" plus ".git/index"; a single "worktree" consists of a bit more, as we have to count per worktree states like .git/rebase-apply/ and .git/refs/bisect/ as part of it.
And from that point of view, HEAD is one of those per worktree states, so...