I am creating and maintaining a repository PURELY in index-db via lighning-fs. There is no remote.
Occasionally I get
RuntimeError: Failed to checkout "default" because commit 9c674814d3115a77cf4293ec750a7a9d1dc87e28 is not available locally. Do a git fetch to make the branch available locally.
Which I think occurs if the page is restarted during a commit.
Claude: The race condition is clear:
- Line 165-171: Write commit object (no fsync)
- Line 174-179: Update ref to point to new commit (no fsync)
So the commit and the update-ref can go out-of-order
I am creating and maintaining a repository PURELY in index-db via lighning-fs. There is no remote.
Occasionally I get
Which I think occurs if the page is restarted during a commit.
Claude: The race condition is clear:
So the commit and the update-ref can go out-of-order