Create commit

This commit is contained in:
2024-03-11 19:29:15 +01:00
parent 2c940abd1d
commit 4e13a27f79
2 changed files with 16 additions and 0 deletions

View File

@@ -76,5 +76,13 @@ def read_tree(tree_oid):
f.write(data.get_object(oid))
def commit(message):
commit = f"tree {write_tree()}\n"
commit += "\n"
commit += f"{message}\n"
return data.hash_object(commit.encode(), "commit")
def is_ignored(path):
return ".ugit" in path.split("/")