#git #state #git2

bin+lib git-state

Probe git repository state

1 unstable release

0.1.0 Nov 2, 2020

#2271 in Command line utilities

Download history 82/week @ 2022-06-02 76/week @ 2022-06-09 187/week @ 2022-06-16 104/week @ 2022-06-23 189/week @ 2022-06-30 87/week @ 2022-07-07 76/week @ 2022-07-14 88/week @ 2022-07-21 78/week @ 2022-07-28 94/week @ 2022-08-04 107/week @ 2022-08-11 167/week @ 2022-08-18 108/week @ 2022-08-25 105/week @ 2022-09-01 100/week @ 2022-09-08 82/week @ 2022-09-15

409 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