#git

rustygit

A simple interface for runnig Git commands

11 releases

✓ Uses Rust 2018 edition

0.3.0 Jan 6, 2020
0.2.7 Jan 3, 2020
0.2.6 Dec 14, 2019
0.1.1 Dec 3, 2019
0.1.0 Nov 26, 2019

#123 in Development tools

Download history 156/week @ 2019-12-08 43/week @ 2019-12-15 13/week @ 2019-12-22 17/week @ 2019-12-29 46/week @ 2020-01-05 23/week @ 2020-01-12 79/week @ 2020-01-19 17/week @ 2020-02-02 12/week @ 2020-02-09 84/week @ 2020-02-16 101/week @ 2020-02-23 24/week @ 2020-03-08 11/week @ 2020-03-15 44/week @ 2020-03-22

104 downloads per month

MIT/Apache

13KB
270 lines

Rusty-git

Build Status Latest version Documentation

A high-level library for interacting with git

Usage

Add the following to your cargo.toml:

[dependencies]
rustygit = "0.2"
use rustygit;

let repo = rustygit::Repository::new(".");
let branches = repo.list_branches().unwrap();

println!("branches:");
for branch in branches {
    println!("{}", branch);
}

Comaprrison with git2-rs

Git2-rs is a mature and featureful Git library and unlike this library does not require that git be on the users $PATH.

This library does however have a few advantages over git2-rs:

  • Pure Rust rather than bindings to a C++ library, making for easier cross-compilation.
  • Works with git's SSH agent on Windows (libssh, which is used by git2-rs is unable to at present, making using SSH not possible on Windows)
  • Provides a higher level API requiring less knowledge of Git internals

Dependencies

~1.6–2.3MB
~60K SLoC