Skip to content
Snippets Groups Projects
Commit 12cfa77a authored by Benoit Boissinot's avatar Benoit Boissinot
Browse files

sort heads by commit date in topological sort

parent 90458271
No related branches found
Tags 0.8.1
No related merge requests found
......@@ -369,6 +369,13 @@
seenheads.add(sha)
todo.append(sha)
# sort by commit date
def commitdate(sha):
obj = self.git.get_object(sha)
return obj.commit_time-obj.commit_timezone
todo.sort(key=commitdate, reverse=True)
# traverse the heads getting a list of all the unique commits
commits = []
seen = set(todo)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment