git.read_object

git

read_object(git_dir, sha_hex) -> obj

Read an object from the object database (loose or packed, deltas resolved)

Returns { type = "commit"|"tree"|"blob"|"tag", size = n, content = raw } or nil when the object is not found.