mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-12-02 22:38:54 -06:00
refactor: read the large-file cache from one place
This commit is contained in:
1 parent
afa1e88457
commit
b350c21329
3 files changed
+6
-4
No files matched your search
@@ -78,10 +78,10 @@ def _hardlink_tree(src: Path, dst: Path) -> None:
|
||||
|
||||
def seed_worktree(repo: Path, worktree: Path) -> list[str]:
|
||||
"""Hard-link what git does not carry: a tool deleting a file drops a link."""
|
||||
from model.largefiles import load_registered_paths
|
||||
from model.largefiles import LARGE_FILES_CACHE, load_registered_paths
|
||||
|
||||
seeded = []
|
||||
for rel in [".cache/large", "data", *load_registered_paths(repo / ".gitignore")]:
|
||||
for rel in [LARGE_FILES_CACHE, "data", *load_registered_paths(repo / ".gitignore")]:
|
||||
src, dst = repo / rel, worktree / rel
|
||||
if src.exists() and not dst.exists():
|
||||
_hardlink_tree(src, dst)
|
||||
|
||||
Reference in new issue
Block a user