mhgit 0.1.0

MHgit is a simple git library for interracting with git repositories.
Documentation
  • Coverage
  • 96.51%
    83 out of 86 items documented15 out of 78 items with examples
  • Size
  • Source code size: 1.76 MB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 6.41 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 26s Average build duration of successful builds.
  • all releases: 26s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • MHmorgan

MHgit

Travis CI build status Crates.io latest version Crates.io downloads GitHub license

MHgit is a simple git library for interracting with git repositories. Provides an idiomatic and easy way of dealing with git repos.

Requires git to be installed on the system.

Supported actions

  • add
  • clone
  • commit
  • init
  • notes
  • pull
  • push
  • remote
  • status
  • stash
  • tag

Example

extern crate mhgit;

use mhgit::{CommandOptions, Repository};
use mhgit::commands::{PushOptions, RemoteOptions};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let repo = Repository::at("/home/mh/awesomeness")?
        .init()?
        .add()?
        .commit("Initial commit")?;
    RemoteOptions::add()
        .master("master")
        .name("upstream")
        .url("https://web.com/myrepo.git")
        .run(&repo)?;
    PushOptions::new()
        .set_upstream(true)
        .remote("origin")
        .refspec("master")
        .run(&repo)?;
    Ok(())
}

Changelog