aboutsummaryrefslogtreecommitdiff
path: root/supergit/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'supergit/src/lib.rs')
-rw-r--r--supergit/src/lib.rs19
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!()
}