diff options
author | Katharina Fey <kookie@spacekookie.de> | 2020-10-27 15:15:23 +0100 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2020-10-27 15:15:23 +0100 |
commit | 623954d19fdf0dca47db319e5c88ee561aa8d25c (patch) | |
tree | 11484edce6ecdff5f43f9533ede17aa56d54d087 /supergit/src/lib.rs | |
parent | aadac179feea5bcdab8e27683be376028ac4df9c (diff) |
Diffstat (limited to '')
-rw-r--r-- | supergit/src/lib.rs | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/supergit/src/lib.rs b/supergit/src/lib.rs index e209fac..887ccc0 100644 --- a/supergit/src/lib.rs +++ b/supergit/src/lib.rs @@ -1,5 +1,13 @@ //! Strongly typed git repository explorer library //! +//! This library exposes a read-only view into a git repository. To +//! get started, open an existing bare repo, and then call `sync()` to +//! build a cache of it. Every time you want your view of the repo to +//! update, call `sync()` again. If you want the sync operation to be +//! blocking, call `sync_blocking()` instead. +//! +//! + mod branch; pub use branch::{Branch, BranchCommit}; @@ -10,15 +18,20 @@ pub use commit::{CommitId, Commit}; mod diff; pub use diff::Diff; -pub(crate) mod raw; +pub mod raw; use std::sync::atomic::{AtomicUsize, Ordering}; +use async_std::sync::{Arc, RwLock}; + +use raw::RawRepository; /// Represents a git repository with lazy data loading -pub struct Repository {} +pub struct Repository { + raw: RawRepository, +} impl Repository { - pub fn open(path: &std::path::Path) -> Self { + pub fn open(path: &std::path::Path) -> Arc<Self> { todo!() } |