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

Re: [PATCH/RFC] Add [] as an alias for a reference to the empty tree

From
Sverre Rabbelier <srabbelier@gmail.com>
Date
May 10, 2010, 11:00 UTC
Message-ID
<AANLkTikrRJZu2I5BYU-UqtjYh0x6WMJ8Frh8DKPUM-yK@mail.gmail.com>
In-Reply-To
<20100510100050.GB2098@coredump.intra.peff.net>
Heya,
On Mon, May 10, 2010 at 12:00, Jeff King <peff@peff.net> wrote:
Show 5 quoted lines
> On Mon, May 10, 2010 at 11:51:05AM +0200, Sverre Rabbelier wrote:
>> Must it be ALL CAPS? In Mercurial the fairly elegant 'nil' is used for
>> the empty commit, why can't we do the same?
>
> [Please watch your quoting, which is a bit misleading there].

Apologies, I accidentally removed Junio's attribution line. I fully intended to reply to both your and Junio's post at the same time :).

> I think the intent was that because they clash in the normal refs
> namespace, we would set them apart with caps (and we have already
> sort-of claimed the all-caps namespace with things like HEAD,
> FETCH_HEAD, etc).

While I understand the rationale, (of already having two all-caps refs), I don't think adding more of them is a good idea. Aesthetically I think 'nil' does make sense, but I agree that 'worktree' and 'index' as lower-case names do not.

> The point was to make a more obvious and verbose alternative for people
> who find "git diff" a little confusing. E.g.:

I don't think that all caps names make for a good solution to that problem though.

-- 
Cheers,

Sverre Rabbelier
Previous: Jeff King
Message 10 of 10 in “Add [] as an alias for a reference to the empty tree”
  1. Add [] as an alias for a reference to the empty treePeter Kjellerstedt, May 7, 2010
  2. Jeff KingMay 8, 2010
  3. Junio C HamanoMay 8, 2010
  4. Jeff KingMay 8, 2010
  5. Jonathan NiederMay 8, 2010
  6. Peter KjellerstedtMay 10, 2010
  7. Jeff KingMay 10, 2010
  8. Sverre RabbelierMay 10, 2010
  9. Jeff KingMay 10, 2010
  10. Sverre RabbelierMay 10, 2010

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.