Iterate commits and parents
This commit is contained in:
parent
dad9077515
commit
7fbf6640f6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user