#commit #git-commit #git-status #info #repo #git-repository #information

commit_info

Gather relevant commit and status information from git repos

2 releases

0.1.1 Apr 1, 2022
0.1.0 Mar 31, 2022

#32 in #git-status

MIT license

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–13MB
~159K SLoC