Re: [RFC] Applying a graft to a tree and "rippling" the changes through
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Nov 19, 2005, 15:27 UTC
- Message-ID
- <Pine.LNX.4.63.0511191612350.4895@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <20051119141341.GE3393@nowhere.earth>
Hi,
On Sat, 19 Nov 2005, Yann Dirson wrote:
> - 1st level describes states that existed > - 2nd level describes events that occured, causing the state to change > - 3rd level describes the succession of events
But using git's approach you have these levels. Only that you do not strictly record them as such:
- 1st level is trees, agreed.
- 2nd level is inside the commits, i.e. if you look at the tree(s) of the parent commit(s), you can extract that tree->tree change.
- 3rd level is not just the succession of events: commit->commit is much stronger.
By the last, I mean that in the commit, by referencing the parent(s) (which itself references its parent(s)) you have the whole history. And by validating the commit object by its SHA1, you have the history immutable, too.
Now, the original purpose of this thread was to discuss a way to un-graft some commit objects, i.e. to re-record a history which was not recorded as such.
This may be nice for completeness purposes, but it contradicts the main idea behind git: You want to be certain about things. By signing off on some commit (together with the meta information about its parent(s) and the tree), you state that you actually placed your work on *that* particular history. And if you based your work on a commit I have, I can be certain that we agree.
The proposed rewriting of the history is very lax about that:
Say, you introduce a history line, where you start with -- say -- some obsolete proprietary code from some telephone company, and then change -- say, by a primitive algorithm -- the code to match git-0.99.8, all the time committing with some random commit message.
Then you make a graft which says git-0.99.8 was derived from that history , too. Now, you ungraft the tree. It looks like other developers and I signed off on working on a "derivative" of some obscure, copyrighted code.
Nice?
Hth, Dscho