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

Re: questions about cg-update, cg-pull, and cg-clone.

From
JBJoel Becker <joel.becker@oracle.com>
Date
May 3, 2005, 17:20 UTC
Message-ID
<20050503172057.GW4747@ca-server1.us.oracle.com>
In-Reply-To
<20050503155915.GV4747@ca-server1.us.oracle.com>
On Tue, May 03, 2005 at 08:59:15AM -0700, Joel Becker wrote:
Show 11 quoted lines
> 	Then you change the first file, adding a few functions.  You
> commit it, and it now has the hash 111111.  This change means the tree
> hash becomes 222222.  So, HEAD contains 222222.
> 	You then update from Petr again.  He's changed the second file.
> It's hash is no longer cccccc, it's eeeeee.  In his tree, the hash of
> the tree is 333333 (from file 1's aaaaaa and file 2's eeeeee).  But the
> hash of your tree is 444444 (from your local file 1's 111111 and file 2's eeeeee).  So, the hash of the your tree becomes 444444.  Your HEAD contains 444444.
> This does _not_ match his 333333 HEAD.  You are committing the
> combination of his change and yours.  He is saying that this work, which
> may have required hand-merging or commit resolution, is "interesting"
> information.
	Actually, it is more than interesting.  The tree has gone from a
HEAD of 222222 to a HEAD of 444444.  When HEAD changes, you need a
commit to describe the path.  Otherwise, you have a breakdown in the
history.  cg-log (or any other command) would have no way to get back
from 444444 to 222222 (or Petr's 333333) without the commit object
specifying its parent(s).
	If you have made no commits on your side, then the old HEAD is
Petr's old HEAD, the new HEAD is Petr's new 333333, and he's already
created a commit object describing this.  You're just fast-forwarding.
Joel
-- 
"The nice thing about egotists is that they don't talk about other
 people."
         - Lucille S. Harper

Joel Becker
Senior Member of Technical Staff
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
Previous: Joel BeckerNext: Daniel Barkalow
Message 7 of 8 in “questions about cg-update, cg-pull, and cg-clone.”
  1. Zack BrownApr 30, 2005
  2. David A. WheelerApr 30, 2005
  3. Zack BrownApr 30, 2005
  4. Petr BaudisMay 2, 2005
  5. Zack BrownMay 3, 2005
  6. Joel BeckerMay 3, 2005
  7. Joel BeckerMay 3, 2005
  8. Daniel BarkalowMay 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.