#git #interface #git2-rs

rustygit

A simple interface for runnig Git commands

17 releases

0.5.0 Feb 16, 2023
0.4.4 Sep 12, 2022
0.4.3 Jan 16, 2022
0.4.2 Aug 23, 2020
0.1.0 Nov 26, 2019

#749 in Development tools

Download history 39/week @ 2024-07-22 106/week @ 2024-07-29 20/week @ 2024-08-05 22/week @ 2024-08-12 14/week @ 2024-08-19 12/week @ 2024-08-26 5/week @ 2024-09-02 11/week @ 2024-09-09 10/week @ 2024-09-16 46/week @ 2024-09-23 42/week @ 2024-09-30 3/week @ 2024-10-07 31/week @ 2024-10-14 13/week @ 2024-10-21 18/week @ 2024-10-28 14/week @ 2024-11-04

76 downloads per month
Used in 5 crates (4 directly)

MIT/Apache

17KB
380 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.4"
use rustygit;

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

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

Comparison 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

~2.3–4MB
~72K SLoC