Files
signed/crates/signed_git/src/worktree.rs
T
reya 5887a14c50
Rust / build (macos-latest, stable) (push) Waiting to run
Rust / build (ubuntu-latest, stable) (push) Waiting to run
Rust / build (windows-latest, stable) (push) Waiting to run
chore: refactor git module (#27)
Reviewed-on: #27
2026-10-07 02:40:12 +00:00

37 lines
895 B
Rust

use std::path::PathBuf;
use crate::history::FileCommit;
pub struct WorktreeSnapshot {
pub entries: Vec<PathBuf>,
pub readme_path: Option<PathBuf>,
pub readme: Option<Vec<u8>>,
pub current_branch: Option<String>,
pub head_commit: Option<FileCommit>,
pub branches: Vec<String>,
pub tags: Vec<String>,
}
impl WorktreeSnapshot {
/// Creates a snapshot of the worktree contents and ref state.
pub(crate) fn new(
entries: Vec<PathBuf>,
readme_path: Option<PathBuf>,
readme: Option<Vec<u8>>,
current_branch: Option<String>,
head_commit: Option<FileCommit>,
branches: Vec<String>,
tags: Vec<String>,
) -> Self {
Self {
entries,
readme_path,
readme,
current_branch,
head_commit,
branches,
tags,
}
}
}