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

Re: commit-id fails after cg-init

From
HAH. Peter Anvin <hpa@zytor.com>
Date
May 4, 2005, 15:45 UTC
Message-ID
<4278EE20.8080004@zytor.com>
In-Reply-To
<4278E6D4.6060807@dwheeler.com>
David A. Wheeler wrote:
Show 18 quoted lines
> Joel Becker said:
> 
>> Well, cg-init in this case creates no objects.  I'd say,
>> instead, it should create an empty tree object (representing a project
>> with no files) and commit that.  That would be your initial commit, and
>> would put something valid in heads/master.
> 
> That would actually make sense; commits would go all the way
> back to the "empty tree" as the ultimate initial tree.
> 
> There's an interesting side-effect of this; I _think_ it's
> fine but it might be worth thinking through. If all
> new projects start with an empty tree, that creates a
> "common root" that all projects can appeal to.
> That means that in theory a merge between any two project root
> trees can eventually find a common ancestor: the empty tree.
> I _think_ that's okay... is it?
> 

In fact, I think that's a Very Good Thing... it eliminates an unnecessary corner case. Same reason linked lists want head nodes and all that jazz.

	-hpa
Previous: David A. WheelerNext: Alexey Nezhdanov
Message 4 of 7 in “commit-id fails after cg-init”
  1. Pavel RoskinMay 3, 2005
  2. Petr BaudisMay 3, 2005
  3. David A. WheelerMay 4, 2005
  4. H. Peter AnvinMay 4, 2005
  5. Alexey NezhdanovMay 5, 2005
  6. David A. WheelerMay 6, 2005
  7. Joel BeckerMay 3, 2005

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.