Write-tree hash files

This commit is contained in:
David Doblas Jiménez 2024-02-28 19:51:24 +01:00
parent af1928a360
commit 4540b98a88

View File

@ -10,8 +10,8 @@ def write_tree(directory="."):
if is_ignored(full):
continue
if entry.is_file(follow_symlinks=False):
# TODO write the file to object store
print(full)
with open(full, "rb") as f:
print(data.hash_object(f.read()), full)
elif entry.is_dir(follow_symlinks=False):
write_tree(full)