Re: [RFC] Stgit - patch history / add extra parents
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Aug 24, 2005, 02:26 UTC
- Message-ID
- <Pine.LNX.4.58.0508231922340.3317@g5.osdl.org>
- In-Reply-To
- <7virxwmbcu.fsf@assigned-by-dhcp.cox.net>
On Tue, 23 Aug 2005, Junio C Hamano wrote:
Show 9 quoted lines
> > Yes it can. GIT does not care if the commit ancestry does not > make sense in contents terms (i.e. you can record one tree > object in a commit object, and record another, completely > unrelated tree object in a commit object that has the first > commit object as its parent). The "git-diff-tree" output from > comparing those two commits may not make _any_ sense at all to > the human, though, but that is not a problem for GIT to do its > work.
One issue is later merges.
If you have incorrect parent information, trying to do a merge may prove impossible and/or ignore changes from the "already merged" stream. By marking another head as a parent, you basically say "I have merged _everything_ leading up to that other head", and if you have only actually done a partial merge (and gotten just a part of the changes, ignoring the others), you'll have to notice that yourself, and forward-port the rest by hand.
For stgit, this probably doesn't matter.
Linus