Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timvisee/git-state
๐งช Probe git repository state
https://github.com/timvisee/git-state
git git-state git2
Last synced: 27 days ago
JSON representation
๐งช Probe git repository state
- Host: GitHub
- URL: https://github.com/timvisee/git-state
- Owner: timvisee
- License: mit
- Created: 2020-11-02T00:45:52.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-15T10:36:50.000Z (about 3 years ago)
- Last Synced: 2024-08-13T07:15:45.998Z (4 months ago)
- Topics: git, git-state, git2
- Language: Rust
- Homepage: https://gitlab.com/timvisee/git-state
- Size: 8.79 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - timvisee/git-state - ๐งช Probe git repository state (Rust)
README
[![Build status on GitLab CI][gitlab-ci-master-badge]][gitlab-ci-link]
[![Newest release on crates.io][crate-version-badge]][crate-link]
[![Documentation][docs-badge]][docs]
[![Project license][crate-license-badge]](LICENSE)[crate-license-badge]: https://img.shields.io/crates/l/git-state.svg
[crate-link]: https://crates.io/crates/git-state
[crate-version-badge]: https://img.shields.io/crates/v/git-state.svg
[docs-badge]: https://docs.rs/git-state/badge.svg
[docs]: https://docs.rs/git-state
[gitlab-ci-link]: https://gitlab.com/timvisee/git-state/pipelines
[gitlab-ci-master-badge]: https://gitlab.com/timvisee/git-state/badges/master/pipeline.svg# 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`][git2-function] 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:```bash
cd my-repository/
git-state# or
git-state my-repository/
```## License
This project is released under the MIT license.
Check out the [LICENSE](LICENSE) file for more information.[git2-function]: https://libgit2.org/libgit2/#HEAD/group/repository/git_repository_state