Iterate commits and parents
This commit is contained in:
@@ -110,6 +110,14 @@ def tag(args):
|
|||||||
|
|
||||||
|
|
||||||
def k(args):
|
def k(args):
|
||||||
|
oids = set()
|
||||||
for refname, ref in data.iter_refs():
|
for refname, ref in data.iter_refs():
|
||||||
print(refname, ref)
|
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
|
# TODO visualize refs
|
||||||
|
|||||||
Reference in New Issue
Block a user