Read tree and move HEAD in checkout

This commit is contained in:
2024-03-29 18:27:10 +01:00
parent 817f38f49c
commit b802e1eb9d
2 changed files with 14 additions and 0 deletions

View File

@@ -97,6 +97,12 @@ def commit(message):
return oid
def checkout(oid):
commit = get_commit(oid)
read_tree(commit.tree)
data.set_HEAD(oid)
Commit = namedtuple("Commit", ["tree", "parent", "message"])