Expand description
Session state persistence.
Saves and loads session data to disk for recovery after crashes, reboots,
or stop. One session per repository, stored as JSON under the XDG data
directory (~/.local/share/git-paw/sessions/).
Structs§
- Repo
Agent Entry - One agent entry in the per-repo discovery file.
- Repo
Session File - The per-repo discovery document written to
<repo>/.git-paw/sessions/<session_name>.json. - Session
- Persisted session state for a git-paw session.
- Worktree
Entry - A worktree entry within a session.
Enums§
- Display
Status - The status git-paw displays for a session, derived from the persisted
receipt status combined with a live tmux probe (design D4 of
session-bugfixes). - Session
Mode - Pane-layout shape used when the session was created. Drives recovery so
recover_sessionrebuilds with the same layout it was launched with. - Session
Status - Status of a persisted session.
Functions§
- delete_
session - Deletes a session file by name.
- delete_
session_ in - Deletes a session file by name from the given directory.
- find_
session_ for_ repo - Finds the session associated with a given repository path.
- find_
session_ for_ repo_ in - Finds the session for a repo path, scanning the given directory.
- load_
all_ sessions_ in - Loads every session receipt in the given directory.
- load_
session_ from - Loads a session by name from the given directory.
- remove_
repo_ session_ file - Removes the per-repo discovery file for a session. Idempotent — a missing file is not an error.
- repo_
session_ path - Returns the per-repo session file path for a session name.
- repo_
sessions_ dir - Returns the per-repo sessions directory:
<repo>/.git-paw/sessions/. - save_
session - Atomically writes a session to disk.
- save_
session_ in - Atomically writes a session to the given directory.
- session_
state_ dir - Returns the sessions directory (
~/.local/share/git-paw/sessions/). - write_
repo_ session_ file - Atomically writes the per-repo discovery file for a session.