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

Re: commit-id fails after cg-init

From
Petr Baudis <pasky@ucw.cz>
Date
May 3, 2005, 21:13 UTC
Message-ID
<20050503211301.GA15995@pasky.ji.cz>
In-Reply-To
<1115150585.28520.11.camel@dv>

Dear diary, on Tue, May 03, 2005 at 10:03:05PM CEST, I got a letter where Pavel Roskin <proski@gnu.org> told me that...

> Hello!
Hello,
> So, cg-init created an empty .git/refs/heads/master and made .git/HEAD a
> symlink to it.  Now, commit-id reads that file and gets confused.
my plan is to make cg-init:
(i) automatically add to cache any existing content in the current directory,
    if there is any
(ii) call cg-commit right away

This will make us free of this annoying special case and if you are importing an existing tree, you want to do this anyway. The only case when it is not 101% right is when starting a new project from fresh, but some first "dummy" special commit shouldn't hurt there either (that will require to modify write-tree to be willing to write an empty tree).

Patches welcome.
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
Previous: Pavel RoskinNext: David A. Wheeler
Message 2 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.