last-git-commit 0.2.0

Simple wrapper arround git2-rs to get info about the last commit. Useful for when you want to show the git hash in a program.
Documentation
  • Coverage
  • 46.67%
    7 out of 15 items documented0 out of 8 items with examples
  • Size
  • Source code size: 19.29 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 446.53 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • olback/lgc-rs
    8 3 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • olback

LastGitCommit-rs

A simple wrapper arround git2-rs to easily get info about the last commit. Useful when you want to show the last commit message or the current git hash.

CircleCI docs

Simple Git Hash Example

use last_git_commit::LastGitCommit;

let lgc = LastGitCommit::new().build().unwrap();
let long = lgc.id().long();
let short = lgc.id().short();
let range = lgc.id().range(0..3).unwrap();

println!("Long: {}", long); // "c4f94258c12b8905f3d57f879ae1171ce367cd29"
println!("Short: {}", short); // "c4f9425"
println!("Range: {}", range); // "c4f"

Please see the documentation and examples.