aboutsummaryrefslogtreecommitdiff
path: root/apps/servers/octopus/supergit/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/servers/octopus/supergit/src/lib.rs')
-rw-r--r--apps/servers/octopus/supergit/src/lib.rs32
1 files changed, 24 insertions, 8 deletions
diff --git a/apps/servers/octopus/supergit/src/lib.rs b/apps/servers/octopus/supergit/src/lib.rs
index ee02daac39c8..856c767ae787 100644
--- a/apps/servers/octopus/supergit/src/lib.rs
+++ b/apps/servers/octopus/supergit/src/lib.rs
@@ -1,8 +1,9 @@
-//! Read-only git repository explorer library.
+//! Strongly typed git repository explorer
//!
-//! This library provides a more Rustic interface for libgit2, built
-//! on the `git2` bindings. If you want more low-level access to your
-//! repository, consider using that library instead.
+//! 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
@@ -10,10 +11,25 @@
//! fetching [`Branch`](struct.Branch.html)es that you are interested
//! in.
//!
-//! Unlike `libgit2`, this library can resolve reverse dependencies
-//! between files, and their commit history. Some of these functions
-//! are very computationally intensive, and will be marked with their
-//! runtime cost.
+//! ```no_run
+//! 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`](crate::prelude)
+//! to get started with development.
pub mod branch;