2 releases
0.1.1 | Apr 1, 2022 |
---|---|
0.1.0 | Mar 31, 2022 |
#134 in #git-commit
14KB
190 lines
This crate gathers relevant git info from any Repo. Some of the info returned includes:
- Git status info: Checks if a repo is dirty, has been modified and so on.
- Commits: Gathers and shows information for the last 10 commits
Example
let dir = "/path/to/repo"; //<- Point to the location of t=your repo
let info = Info::new(&dir).status_info()?.commit_info()?;
println("{:#?}", info);
lib.rs
:
This crate gathers relevant git info from any Repo. Some of the info returned includes:
- Git status info: Checks if a repo is dirty, has been modified and so on.
- Commits: Gathers and shows information for the last 10 commits
Example
# let mut path = env::current_dir().unwrap();
# path.push("test_project");
# let dir = path.to_string_lossy().to_string();
// let dir = "/path/to/repo"; <- Point to the location of t=your repo
let info = Info::new(&dir).status_info()?.commit_info()?;
println("{:#?}", info);
Dependencies
~5–14MB
~165K SLoC