summaryrefslogtreecommitdiff
path: root/merge-base.c
AgeCommit message (Collapse)AuthorFilesLines
2005-05-20sparse cleanupLibravatar Linus Torvalds1-1/+1
Fix various things that sparse complains about: - use NULL instead of 0 - make sure we declare everything properly, or mark it static - use proper function declarations ("fn(void)" instead of "fn()") Sparse is always right.
2005-05-19[PATCH] cleanup of in-code namesLibravatar Alexey Nezhdanov1-1/+1
Fixes all in-code names that leaved during "big name change". Signed-off-by: Alexey Nezhdanov <snake@penza-gsm.ru> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-18merge-base: use the new lookup_commit_reference() helper functionLibravatar Linus Torvalds1-2/+2
This allows you to use tags for merge bases.
2005-05-01Add "get_sha1()" helper function.Libravatar Linus Torvalds1-2/+2
This allows the programs to use various simplified versions of the SHA1 names, eg just say "HEAD" for the SHA1 pointed to by the .git/HEAD file etc. For example, this commit has been done with git-commit-tree $(git-write-tree) -p HEAD instead of the traditional "$(cat .git/HEAD)" syntax.
2005-04-23[PATCH] Allow multiple date-ordered listsLibravatar Daniel Barkalow1-21/+5
Make pop_most_recent_commit() return the same objects multiple times, but only if called with different bits to mark. This is necessary to make merge-base work again. Signed-Off-By: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-23[PATCH] Replace merge-base implementationLibravatar Daniel Barkalow1-48/+44
The old implementation was a nice algorithm, but, unfortunately, it could be confused in some cases and would not necessarily do the obvious thing if one argument was decended from the other. This version fixes that by changing the criterion to the most recent common ancestor. Signed-Off-By: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-18Merge the new object model thing from Daniel BarkalowLibravatar Linus Torvalds1-38/+76
This was a real git merge with conflicts. I'll commit the scripts I used to do the merge next. Not pretty, but it's half-way functional.
2005-04-18[PATCH] Switch implementations of merge-base, port to parsingLibravatar Daniel Barkalow1-42/+80
This switches to my implementation of merge-base, but with the new parsing library. Signed-Off-By: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-17Make "parse_commit" return the "struct revision" for the commit.Libravatar Linus Torvalds1-4/+1
Also, make it a fatal error to pass in a non-commit object. The callers never checked, so better check here. This simplifies merge-base further. It's now so trivial that it's almost ridiculous.
2005-04-17Do a very simple "merge-base" that finds the most recent commonLibravatar Linus Torvalds1-0/+57
parent of two commits. The question of "best" commit can probably be tweaked almost arbitrarily. In particular, trying to take things like how big the tree differences are into account migt be a good idea. This one is just very simple.