summaryrefslogtreecommitdiff
path: root/tests-clar/diff/patch.c
diff options
context:
space:
mode:
authorScott J. Goldman <scottjg@github.com>2012-12-09 21:24:47 -0800
committerScott J. Goldman <scottjg@github.com>2012-12-09 21:24:47 -0800
commite51c8b99be1fc35bd3db30ae629cc404942cdc24 (patch)
tree9d5212b4fd88226ba54e36cf354825b986b9c5a4 /tests-clar/diff/patch.c
parentb337814e70a836fe6611df4a10032fd01ed713a3 (diff)
downloadlibgit2-e51c8b99be1fc35bd3db30ae629cc404942cdc24.tar.gz
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.
Diffstat (limited to 'tests-clar/diff/patch.c')
0 files changed, 0 insertions, 0 deletions