from pathlib import Path
import subprocess
import sys
root=Path(sys.argv[1]).resolve()
for label,n in [('split',498),('fits',497)]:
    d=root/label
    (d/'proj').mkdir(parents=True,exist_ok=True)
    (d/'proj/b.txt').write_text('hit\n')
    # Slash-separated components keep each component below NAME_MAX.
    units='x'*200+'/'+'x'*200+'/'+'x'*(n-402)
    p=d/('note\n('+units+'🚀)\n')/'b.txt'
    p.parent.mkdir(parents=True,exist_ok=True)
    p.write_text('hit\n')
subprocess.run(['git','init','-q',str(root)],check=True)
print(root)
