[][src]Crate mhgit

MHgit is a simple git library for interracting with git repositories.

Interraction with git repositories are done through Repository objects.

Simple git commands can be run with the repository methods. For more complex commands, or to set command options before running, several Options types are provided.

use mhgit::{Repository, CommandOptions};
use mhgit::commands::AddOptions;
 
let repo = Repository::new();
AddOptions::new()
           .all(true)
           .run(&repo)?;

Creating repository

use mhgit::Repository;
Repository::at("/home/mh/awesomeness")?
           .init()?
           .add()?
           .commit("Initial commit")?;

Modules

commands

Git command types: AddOptions, PushOptions, etc.

Structs

GitError

Git errors are returned when a git command fails.

Repository

A handle to a git repository.

Status

Git status data.

Enums

GitOut

GitOut indicates if git output should be piped or printed.

Traits

CommandOptions

Trait implemented by all command option struct (CommitOptions, PushOptions, etc.)