527d5696 ยท zzmq.dev@gmail.com/zz
Commit
527d5696c2955f227d9d76977888a29f4e30fe05
Support subdirectories in Artifacts changesets and initial commits commitChangesetOnArtifacts previously rejected any path containing a "/" outright -- it only ever built a single flat git tree object, which can't represent a subdirectory at all. Fixed by actually recursing: flattenTree walks a parent tree's own "tree"-typed entries (the native readTree binding only returns one level at a time) to find every real file at any depth, and the new writeNestedTree builds a real nested tree bottom-up from a flat path map, writing a subtree object (and its own further subtrees) for each directory level. Unchanged files are still re-fetched and re-written by content so their oid reproduces exactly, same reasoning as before this fix, just no longer limited to the root level. createInitialCommit (a repo's very first commit) had the same flat-only limitation and now goes through the same writeNestedTree helper, so a from-scratch repo can start with subdirectories too. Verified live against the deployed Worker: committed files at "tests/test_shoes.py" and "tests/nested/deep/example.txt" (two levels deep) alongside existing top-level files, then cloned the repo fresh and confirmed all of it round-tripped correctly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q8tksS4bucUkJguqksSVYR
Troy Howard <thoward37@gmail.com> -- 2026-10-13T21:11:58.000Z