1 unstable release

0.1.0 Nov 2, 2020

#11 in #git2

Download history 7/week @ 2024-02-05 15/week @ 2024-02-12 12/week @ 2024-02-19 32/week @ 2024-02-26 23/week @ 2024-03-04 91/week @ 2024-03-11 57/week @ 2024-03-18 32/week @ 2024-03-25 68/week @ 2024-04-01 18/week @ 2024-04-08 13/week @ 2024-04-15 28/week @ 2024-04-22 27/week @ 2024-04-29 24/week @ 2024-05-06 15/week @ 2024-05-13

96 downloads per month
Used in 4 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