Crates.io | supergit |
lib.rs | supergit |
version | 0.2.1 |
source | src |
created_at | 2020-11-09 21:00:44.040405 |
updated_at | 2021-01-08 13:39:20.863286 |
description | A strongly typed, read-only representation of a git repository |
homepage | |
repository | https://git.spacekookie.de/kookienomicon/about/apps/servers/octopus/supergit |
max_upload_size | |
id | 310472 |
size | 129,722 |
Strongly typed git repository explorer This library provides a more
Rustic interface for git repositories, built on the git2
bindings.
If you want more low-level access to your repository, consider using
that library instead.
supergit aims to make queries into a git repo as typed and easy as
possible. Start by creating a Repository
, and enumerating or
fetching Branch
es that you are interested in.
use supergit::Repository;
let r = Repository::open("/path/to/repo").unwrap();
println!("{:?}", r.branches());
let branch = r.branch("main").unwrap();
let head = branch.head();
println!("{}: {}", head.id(), head.summary().unwrap_or("".into()));
The main abstraction layer for a repository is a set of iterators,
over branches, commits, and files in commit trees. Some functions
implemented in supergit
are quite computationally intensive; they
are marked as such with their runtime cost! It's recommended to
include supergit::prelude
to get started with development.