src/graph.c


Log

Author Commit Date CI Message
Carlos Martín Nieto 33a59401 2013-03-22T20:22:39 graph: make the ahead-behind docs clearer Explain it in local-upstream branch terms so it's easier to grasp than with the `one` and `two` naming from the merge-base code.
Edward Thomson 359fc2d2 2013-01-08T17:07:25 update copyrights
Scott J. Goldman 7d26c410 2012-12-09T21:55:51 Fix a bunch of leaks, error handling cases
Scott J. Goldman e51c8b99 2012-12-09T21:24:47 Fix mark_parents() to account for bad luck traversals If commit timestamps are off, we're more likely to hit a traversal where the first path ends up traversing past the root commit of the tree. If that happens, it's possible that the loop will complete before the second path marks some of those final parents. This fix keeps track of the root nodes that are encountered in the traversal, and verify that they are properly marked. In the best case, with accurate timestamps, the traversal will continue to terminate when all the commits are STALE (parents of a merge-base), as it did before. In the worst case, where one path makes a complete traversal past a root commit, we will continue the loop until the root commit itself is marked.
Scott J. Goldman 9c2a4e8c 2012-12-09T21:01:46 Morph copy of git_merge__bases_many() -> mark_parents() Integrate mark_parents() with the ahead_behind() code.
Scott J. Goldman a3a81ae5 2012-12-09T20:43:26 Copy git_merge__bases_many() for new ahead-behind code To be used as a basis for a function which marks nodes with parents up to the merge base.
Carlos Martín Nieto da820437 2012-11-30T15:26:45 graph: plug leak
Russell Belfer d5e44d84 2012-11-29T17:02:27 Fix function name and add real error check `revwalk.h:commit_lookup()` -> `git_revwalk__commit_lookup()` and make `git_commit_list_parse()` do real error checking that the item in the list is an actual commit object. Also fixed an apparent typo in a test name.
Scott J. Goldman b994bfe3 2012-11-28T18:48:22 graph.c: prune includes
Scott J. Goldman 0984c876 2012-11-28T18:27:43 Rename git_count_ahead_behind -> git_graph_ahead_behind Moved it into graph.{c,h} which i created for the new "graph" functions namespace. Also adjusted the function prototype to use `size_t` and `const git_oid *`.