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, Date};

fn main() {

    let lgc = LastGitCommit::new(None, None).unwrap();
    let timestamp = lgc.date.timestamp();
    let utc_string = lgc.date.utc_string();

    println!("Timestamp: {}", timestamp); // 1563461711
    println!("UTC String: {}", utc_string); // "2019-07-18 14:55:18"

}