Write the tree of ``ref`` into ``dest``.
(ref, dest)
| 121 | |
| 122 | |
| 123 | def 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 | |
| 134 | def include_dir(python): |