From 3ca87e463acfeb9ef5bd9a90bcedbb8e360d02e0 Mon Sep 17 00:00:00 2001 From: Katharina Fey Date: Fri, 8 Jan 2021 14:36:31 +0100 Subject: supergit: add logo and rebuild README --- apps/servers/octopus/supergit/README.md | 34 +++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'apps/servers/octopus/supergit/README.md') diff --git a/apps/servers/octopus/supergit/README.md b/apps/servers/octopus/supergit/README.md index 6c6d3f387f9e..b105f186da7d 100644 --- a/apps/servers/octopus/supergit/README.md +++ b/apps/servers/octopus/supergit/README.md @@ -1,3 +1,33 @@ -# supergit +
+ +

supergit

+
-A typed wrapper around libgit2. + +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. + +```rust +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. -- cgit v1.2.3