Expand description
§use-git-status
Primitive Git status metadata vocabulary for RustUse.
use-git-status models index, worktree, conflict, file-change, and porcelain status labels. It does not compute repository status.
§Basic usage
use use_git_status::{GitIndexStatus, GitStatus, GitWorktreeStatus};
let status = GitStatus::new()
.with_index(GitIndexStatus::Modified)
.with_worktree(GitWorktreeStatus::Unmodified);
assert!(!status.is_clean());
assert_eq!(status.porcelain_code(), "M ");§Scope
- Model common status labels such as added, modified, deleted, renamed, copied, untracked, ignored, and conflicted.
- Keep index/worktree scanning and status computation out of scope.
Structs§
- GitStatus
- Combined status metadata.
Enums§
- GitConflict
Status - Conflict status vocabulary.
- GitFile
Change - File-change vocabulary.
- GitIndex
Status - Index-side status vocabulary.
- GitStatus
Parse Error - Error returned while parsing status vocabulary.
- GitWorktree
Status - Worktree-side status vocabulary.