git_info 0.1.1

Extracts git repository information.
Documentation

git_info

crates.io Build Status Build status codecov license Libraries.io for GitHub Documentation downloads Built with cargo-make

Extracts git repository information.

Overview

This library main goal is to provide development/build tools such as cargo-make the needed information on the current git repository.

Usage

Simply include the library and invoke the get function to pull all info as follows:

extern crate git_info;

fn main() {
    let info = git_info::get();

    println!("User Name: {}", info.user_name.unwrap());
    println!("User Email: {}", info.user_email.unwrap());
    println!("Dirty: {}", info.dirty.unwrap());
    println!("Current Branch: {}", info.current_branch.unwrap());
    println!("Config: {:#?}", info.config.unwrap());
    println!("Branches: {:#?}", info.branches.unwrap());
}

Installation

In order to use this library, just add it as a dependency:

[dependencies]
git_info = "*"

API Documentation

See full docs at: API Docs

Contributing

See contributing guide

Release History

See Changelog

License

Developed by Sagie Gur-Ari and licensed under the Apache 2 open source license.