2 releases

✓ Uses Rust 2018 edition

0.1.1 Dec 7, 2019
0.1.0 Nov 27, 2019

#40 in Build Utils

Download history 897/week @ 2019-12-14 1025/week @ 2019-12-21 1859/week @ 2019-12-28 2074/week @ 2020-01-04 5184/week @ 2020-01-11 7781/week @ 2020-01-18 3572/week @ 2020-01-25 1458/week @ 2020-02-01 1480/week @ 2020-02-08 1159/week @ 2020-02-15 665/week @ 2020-02-22 987/week @ 2020-02-29 1852/week @ 2020-03-07 1713/week @ 2020-03-14 2687/week @ 2020-03-21 1296/week @ 2020-03-28

1,401 downloads per month
Used in cargo-make

Apache-2.0

785KB
317 lines

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.

No runtime deps