1 unstable release

0.1.0 Nov 2, 2020

#10 in #git2

Download history 17/week @ 2024-07-23 25/week @ 2024-07-30 186/week @ 2024-08-06 254/week @ 2024-08-13 111/week @ 2024-08-20 53/week @ 2024-08-27 62/week @ 2024-09-03 319/week @ 2024-09-10 145/week @ 2024-09-17 64/week @ 2024-09-24 120/week @ 2024-10-01 44/week @ 2024-10-08 196/week @ 2024-10-15 187/week @ 2024-10-22 25/week @ 2024-10-29 178/week @ 2024-11-05

601 downloads per month
Used in 5 crates (via prs-lib)

MIT license

6KB
68 lines

Build status on GitLab CI Newest release on crates.io Documentation Project license

git-state

A simple binary and Rust library to probe the state of a git repository. Useful for shell prompts.

This reimplements git2::git_repository_state in pure Rust. This doesn't have any nasty compile or runtime git2 dependencies. The git command-line interface doesn't provide this functionality.

States

Any of the following state is returned:

Clean
Merge
Revert
RevertSequence
CherryPick
CherryPickSequence
Bisect
Rebase
RebaseInteractive
RebaseMerge
ApplyMailbox
ApplyMailboxOrRebase

Usage

Command-line usage:

cd my-repository/
git-state

# or
git-state my-repository/

License

This project is released under the MIT license. Check out the LICENSE file for more information.

No runtime deps