last-git-commit 0.1.1

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
1
2
3
4
5
6
7
8
9
10
11
12
13
extern crate last_git_commit;
use last_git_commit::{LastGitCommit, Author};

fn main() {

    let lgc = LastGitCommit::new(None, None).unwrap();
    let name = lgc.author.name();
    let email = lgc.author.email();

    println!("Name: {}", name); // "Jon Doe"
    println!("Email: {}", email); // "jondoe@example.com"

}