"""Create identical synthetic git project data; usage: python3 seed.py PROJECT_DIR."""
from pathlib import Path
import subprocess, sys
project=Path(sys.argv[1]); project.mkdir(parents=True, exist_ok=True)
for i in range(32000):
    file=project/f'files-{i//1000}'/f'fixture-{i}.txt'
    file.parent.mkdir(exist_ok=True)
    file.write_text(f'Synthetic checkpoint fixture {i}\n'*16)
subprocess.run(['git','init','-q',str(project)],check=True)
subprocess.run(['git','-C',str(project),'add','.'],check=True)
subprocess.run(['git','-C',str(project),'-c','user.name=Evidence','-c','user.email=evidence@example.invalid','commit','-qm','Synthetic fixture'],check=True)
