rustygit

Crates.iorustygit
lib.rsrustygit
version0.5.0
sourcesrc
created_at2019-11-26 21:36:08.736814
updated_at2023-02-16 20:53:13.071122
descriptionA simple interface for runnig Git commands
homepage
repositoryhttps://github.com/keirlawson/rusty-git
max_upload_size
id184592
size29,959
Keir Lawson (keirlawson)

documentation

README

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
Commit count: 64

cargo fmt