supergit 0.2.1

A strongly typed, read-only representation of a git repository
Documentation
  • Coverage
  • 92.5%
    37 out of 40 items documented1 out of 16 items with examples
  • Size
  • Source code size: 129.19 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.24 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 27s Average build duration of successful builds.
  • all releases: 27s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • spacekookie

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 Branches 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()));

Library structure

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.