pub trait WorkingCopy {
// Required methods
fn tracked_paths(&self) -> Result<Vec<u8>, EngineError>;
fn untracked_paths(&self) -> Result<Vec<u8>, EngineError>;
fn has_tracked_changes(&self) -> Result<bool, EngineError>;
}Expand description
Reading the working copy. Only the ADR-0017 snapshots use this.
Required Methods§
Sourcefn tracked_paths(&self) -> Result<Vec<u8>, EngineError>
fn tracked_paths(&self) -> Result<Vec<u8>, EngineError>
NUL-terminated tracked paths.
Sourcefn untracked_paths(&self) -> Result<Vec<u8>, EngineError>
fn untracked_paths(&self) -> Result<Vec<u8>, EngineError>
NUL-terminated untracked-but-not-ignored paths.
Sourcefn has_tracked_changes(&self) -> Result<bool, EngineError>
fn has_tracked_changes(&self) -> Result<bool, EngineError>
Whether any tracked file differs from HEAD, staged or unstaged.
Untracked files are a separate question — untracked_paths answers
that — because a snapshot admits them via --add, and the two are
detected by different plumbing.
May answer true for a merely stat-dirty index, where a content
comparison would say otherwise. That is the safe direction: a spurious
true costs a no-op checkbox, a spurious false would hide an option
the reviewer needs.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".