Make git refs the source of truth for git-backed workspaces
When tsk init runs inside a git repository, all workspace state — tasks,
index, attrs, backlinks, remotes — is stored as git blobs addressed by refs
under refs/tsk/. No file cache is kept on disk; only a marker file in .tsk/
records that this is a git-backed workspace.
Outside of git repositories, the file-based backend remains and continues to
keep state in .tsk/.
Architecture: a Store trait (src/backend.rs) exposes a tiny logical blob
key/value API. FileStore writes files; GitStore writes git blobs via git2
and addresses them by ref. High-level operations (next_id, read/write_task,
attrs, backlinks, remotes, move_task) are free functions over &dyn Store so
both backends share a single implementation.
Storage changes:
- Per-task attrs and backlinks are now their own blobs (attrs/<id>,
backlinks/<id>) instead of filesystem xattrs — uniform across backends.
- Active vs archived tasks live in distinct ref/path namespaces (tasks/<id>
vs archive/<id>); drop and reopen now move the blob rather than maintain
symlinks.
- Removed nix flock dependency along with the now-unused locking helper.
Tests: both backends exercised through a shared lifecycle suite, plus
backend-level round-trip tests for blob ops, listing, attrs, backlinks,
remotes, and active/archive helpers.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>