MCPcopy Create free account
hub / github.com/aio-libs/multidict / export_tree

Function export_tree

tools/codegen_diff.py:123–131  ·  view source on GitHub ↗

Write the tree of ``ref`` into ``dest``.

(ref, dest)

Source from the content-addressed store, hash-verified

121
122
123def export_tree(ref, dest):
124 """Write the tree of ``ref`` into ``dest``."""
125 dest.mkdir(parents=True, exist_ok=True)
126 archive = run(
127 ["git", "archive", "--format=tar", ref],
128 text=False,
129 stdout=subprocess.PIPE,
130 ).stdout
131 run(["tar", "-x", "-C", dest], text=False, input=archive)
132
133
134def include_dir(python):

Callers 1

mainFunction · 0.85

Calls 1

runFunction · 0.70

Tested by

no test coverage detected