Re: [PATCH] merge-base
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Apr 14, 2005, 03:49 UTC
- Message-ID
- <Pine.LNX.4.58.0504132040020.7211@ppc970.osdl.org>
- In-Reply-To
- <Pine.LNX.4.21.0504131447480.30848-100000@iabervon.org>
On Wed, 13 Apr 2005, Daniel Barkalow wrote:
Show 9 quoted lines
> > I wrote a pretty dumb program that will find some common ancestor for a > pair of commits. It finds the one which is closest to one of the commits > by number of generations. This is, at least, not strictly worse than any > other common ancestor, at least (like picking the original release would > be). > > It wouldn't be too hard to do this much with rev-tree, but should be > easier to extend.
I agree. But I did the silly "common revision tracking" part slightly differently and in particular I already made fsck and rev-tree use the same exact code.
Also, I don't see why you did the "common parent" thing as part of the "library", since that really does seem to be a very specific to this problem, and neither fsck nor rev-tree really wants it.
Also, the date parsing really is a separate issue from the revision tracking (fsck does not want date parsing, but rev-tool does), so I think you might want to do for date parsing what I just did for the revision.h thing? No point in tying them together.
So could I ask you to re-factor it and base it on my current tree? Make the "merge-base" program have that common parent thing in it, and factor out the common date parsing into "parse-date.c" or something?
Linus