Print hashed objects
This commit is contained in:
@@ -15,3 +15,8 @@ def hash_object(data):
|
||||
with open(f"{GIT_DIR}/objects/{oid}", "wb") as out:
|
||||
out.write(data)
|
||||
return oid
|
||||
|
||||
|
||||
def get_object(oid):
|
||||
with open(f"{GIT_DIR}/objects/{oid}", "rb") as f:
|
||||
return f.read()
|
||||
|
||||
Reference in New Issue
Block a user