Skip to main content

Crate use_git_status

Crate use_git_status 

Source
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§

GitConflictStatus
Conflict status vocabulary.
GitFileChange
File-change vocabulary.
GitIndexStatus
Index-side status vocabulary.
GitStatusParseError
Error returned while parsing status vocabulary.
GitWorktreeStatus
Worktree-side status vocabulary.