Summary
Against a Durable Object-backed Workspace (withWorkspace + createGitClient(), @cloudflare/computer@0.2.1, production workerd), the git flow is broken end to end:
ws.git.init({}) resolves successfully but writes nothing — /.git/ never gains HEAD, config, or refs/.
- Direct workspace-fs writes under
.git/ (mkdir + writeFile of HEAD/config) resolve successfully but vanish: subsequent reads report ENOENT. Non-git paths (including dotfiles elsewhere) persist fine.
ws.git.add() works (index + blobs land, status() reports staged files).
ws.git.commit() then fails with Cannot read properties of null (reading 'startsWith') inside isomorphic-git _commit, which reads <gitdir>/HEAD first thing.
Repro
On a fresh workspace: write a file, status() (throws not-a-repo, as expected), init({}) (resolves), add({paths}) (works), commit({message, author}) → startsWith TypeError. Probing /.git afterwards shows only [index, objects] — no HEAD, ever. Per-board repos (init({dir, defaultBranch})) and symbolic-HEAD-via-updateRef behave identically: silent success, nothing persists.
Impact
Any consumer relying on workspace git (commit/log/history) against DO storage hits this. We worked around it with fs-native snapshotting, but the documented git path (init/add/commit/log) cannot complete a single commit.
Happy to provide a minimal Worker repro or wrangler tail logs on request.
Summary
Against a Durable Object-backed Workspace (
withWorkspace+createGitClient(),@cloudflare/computer@0.2.1, production workerd), the git flow is broken end to end:ws.git.init({})resolves successfully but writes nothing —/.git/never gainsHEAD,config, orrefs/..git/(mkdir + writeFile of HEAD/config) resolve successfully but vanish: subsequent reads report ENOENT. Non-git paths (including dotfiles elsewhere) persist fine.ws.git.add()works (index + blobs land,status()reports staged files).ws.git.commit()then fails withCannot read properties of null (reading 'startsWith')inside isomorphic-git_commit, which reads<gitdir>/HEADfirst thing.Repro
On a fresh workspace: write a file,
status()(throws not-a-repo, as expected),init({})(resolves),add({paths})(works),commit({message, author})→ startsWith TypeError. Probing/.gitafterwards shows only[index, objects]— no HEAD, ever. Per-board repos (init({dir, defaultBranch})) and symbolic-HEAD-via-updateRefbehave identically: silent success, nothing persists.Impact
Any consumer relying on workspace git (commit/log/history) against DO storage hits this. We worked around it with fs-native snapshotting, but the documented git path (init/add/commit/log) cannot complete a single commit.
Happy to provide a minimal Worker repro or wrangler tail logs on request.