Iterate commits and parents

This commit is contained in:
David Doblas Jiménez 2024-05-16 11:54:52 +02:00
parent dad9077515
commit 7fbf6640f6

View File

@ -110,6 +110,14 @@ def tag(args):
def k(args):
oids = set()
for refname, ref in data.iter_refs():
print(refname, ref)
oids.add(ref)
for oid in base.iter_commits_and_parents(oids):
commit = base.get_commit(oid)
print(oid)
if commit.parent:
print("Parent", commit.parent)
# TODO visualize refs