On Tue, May 03, 2005 at 08:22:15AM -0700, Zack Brown wrote: > So, suppose I'm working on your Cogito HEAD. I make some changes to my local > tree and commit them to my tree, and then before I go forward, I want to grab > whatever you've done recently, to make sure we're not in conflict before I add > new changes. If I understand you right, this situation would be a 'fast forward > merge'. So what is the command I give to just 'merge' your HEAD with mine, > without requiring a changelog entry? Remember that HEAD is merely a SHA1 of the toplevel tree object. Imagine you have the simplest tree, one directory containing one file. The file has the has hash aaaaaa. The tree object containing it has the hash bbbbbb. So, HEAD contains bbbbbb. Now you update from Petr, having made no changes. You pull his newest tree, which also has a new file. That new file has the hash cccccc. The new tree object, containing both files, now has the hash dddddd. HEAD now contains dddddd. As you are in a matching state to his tree, you have not done anything interesting to your tree, and there is no commit. This is a "fast-forward" merge. 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. Joel -- Life's Little Instruction Book #69 "Whistle" Joel Becker Senior Member of Technical Staff Oracle E-mail: joel.becker@oracle.com Phone: (650) 506-8127 - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.htmlReceived on Wed May 04 02:00:24 2005
This archive was generated by hypermail 2.1.8 : 2005-05-04 02:00:24 EST