Expand description
High-level git control-panel operations for a pod’s git repository.
Each function shells out to the git binary via tokio::process::Command.
All functions take repo: &Path — the absolute filesystem path to the
pod’s git repository (i.e. data_root/{pubkey}).
These are wired to REST endpoints in solid-pod-rs-server behind
#[cfg(feature = "git")].
Structs§
- Branch
Info - Current branch state.
- Commit
Entry - A single commit log entry.
- Commit
Result - Result of a successful commit.
- File
Status - A single file entry in the status report.
- Status
Report - Full status report for a repository.
Enums§
- Change
Type - Type of change reported by
git status.
Functions§
- git_add
- Stage files. If
allis true, runsgit add -A. Otherwise stages only the listedpaths. - git_
branches - Return the list of local branches and identify the current one.
- git_
commit - Create a commit with the given message. Returns the new commit hash and a one-line summary.
- git_
create_ branch - Create and switch to a new branch called
name. - git_
diff - Return a unified diff for the repository or a specific file.
- git_
discard - Discard working-tree changes to the listed
paths(equivalent togit checkout -- <paths>). - git_log
- Return the commit log for
repo, up tolimitentries (capped at 100). - git_
status - Return the working-tree and index status of
repo. - git_
unstage - Unstage files. If
allis true, unstages everything. Otherwise unstages only the listedpaths. - parse_
status_ output - Pure-function status parser — split out for unit-testing.