diff options
author | Katharina Fey <kookie@spacekookie.de> | 2021-01-08 14:36:31 +0100 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2021-01-09 01:48:01 +0100 |
commit | 3ca87e463acfeb9ef5bd9a90bcedbb8e360d02e0 (patch) | |
tree | fa1af86a312a3005e5e0a762b8c7b28fec43e1b2 | |
parent | c3d64b9be3865649eadb52f580b4ee43b9d72c02 (diff) |
supergit: add logo and rebuild README
-rw-r--r-- | apps/servers/octopus/supergit/Cargo.toml | 8 | ||||
-rw-r--r-- | apps/servers/octopus/supergit/README.md | 34 | ||||
-rw-r--r-- | apps/servers/octopus/supergit/logo.png | bin | 0 -> 54960 bytes | |||
-rw-r--r-- | apps/servers/octopus/supergit/src/repo.rs | 2 |
4 files changed, 37 insertions, 7 deletions
diff --git a/apps/servers/octopus/supergit/Cargo.toml b/apps/servers/octopus/supergit/Cargo.toml index 5646d27c5643..ca9fb5ccca6e 100644 --- a/apps/servers/octopus/supergit/Cargo.toml +++ b/apps/servers/octopus/supergit/Cargo.toml @@ -1,14 +1,14 @@ [package] name = "supergit" description = "A strongly typed, read-only representation of a git repository" -version = "0.2.0" +version = "0.2.1" authors = ["Katharina Fey <kookie@spacekookie.de>"] edition = "2018" license = "GPL-3.0-or-later" documentation = "https://docs.rs/supergit" readme = "README.md" +repository = "https://git.spacekookie.de/kookienomicon/about/apps/servers/octopus/supergit" [dependencies] -git2 = "0.11" -async-std = { version = "1.0", features = ["unstable"] } -atomptr = "1.0"
\ No newline at end of file +atomptr = "1.0" +git2 = "0.11"
\ No newline at end of file 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 +<div align="center"> + <img src="/kookienomicon/plain/apps/servers/octopus/supergit/logo.png" width="256px"/> + <h1>supergit</h1> +</div> -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. diff --git a/apps/servers/octopus/supergit/logo.png b/apps/servers/octopus/supergit/logo.png Binary files differnew file mode 100644 index 000000000000..0ae7a35c98ba --- /dev/null +++ b/apps/servers/octopus/supergit/logo.png diff --git a/apps/servers/octopus/supergit/src/repo.rs b/apps/servers/octopus/supergit/src/repo.rs index 2edc78dcecf7..28348709d22d 100644 --- a/apps/servers/octopus/supergit/src/repo.rs +++ b/apps/servers/octopus/supergit/src/repo.rs @@ -1,6 +1,6 @@ //! Raw representation wrappers for libgit2 -use crate::branch::{Branch, BranchCommit}; +use crate::branch::Branch; use git2::{self, Oid}; use std::{fmt, sync::Arc}; |