~timvisee/git-state

🧪 Probe git repository state
c7a2e06e — timvisee 3 years ago
Add GitLab CI crate release job, minor cleanup
f6d2bd4d — timvisee 3 years ago
Add basic GitLab CI configuration
ae17e149 — timvisee 3 years ago
Update README

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~timvisee/git-state
read/write
git@git.sr.ht:~timvisee/git-state

You can also use your local clone with git send-email.

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.