MCPcopy Create free account
hub / github.com/libgit2/pygit2 / gen_blob_sha1

Function gen_blob_sha1

test/utils.py:79–84  ·  view source on GitHub ↗
(data: bytes)

Source from the content-addressed store, hash-verified

77
78
79def gen_blob_sha1(data: bytes) -> str:
80 # http://stackoverflow.com/questions/552659/assigning-git-sha1s-without-git
81 m = hashlib.sha1()
82 m.update(f'blob {len(data)}\0'.encode())
83 m.update(data)
84 return m.hexdigest()
85
86
87def force_rm_handle(

Callers

nothing calls this directly

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…