radicle_surf/lib.rs
1// This file is part of radicle-git
2// <https://github.com/radicle-dev/radicle-git>
3//
4// Copyright (C) 2019-2023 The Radicle Team <dev@radicle.xyz>
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License version 3 or
8// later as published by the Free Software Foundation.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program. If not, see <https://www.gnu.org/licenses/>.
17
18//! `radicle-surf` is a library to help users explore a Git repository with
19//! ease. It supports browsing a repository via the concept of files and
20//! directories, or via blobs and trees in a git fashion. With the additional
21//! support of [`diff::Diff`] and [`History`], this library can be used to build
22//! an intuitive UI for any Git repository.
23//!
24//! The main entry point of the library API is [`Repository`].
25//!
26//! Let's start surfing!
27//!
28//! ## Serialization with feature `serde`
29//!
30//! Many types in this crate support serialization using [`Serde`][serde]
31//! through the `serde` feature flag for this crate.
32//!
33//! [serde]: https://crates.io/crates/serde
34
35extern crate radicle_git_ext as git_ext;
36
37/// Re-exports.
38pub use radicle_git_ext::ref_format;
39
40/// Represents an object id in Git. Re-exported from `radicle-git-ext`.
41pub type Oid = radicle_git_ext::Oid;
42
43pub mod blob;
44pub mod diff;
45pub mod fs;
46pub mod tree;
47
48/// Private modules with their public types.
49mod repo;
50pub use repo::Repository;
51
52mod glob;
53pub use glob::Glob;
54
55mod history;
56pub use history::History;
57
58mod branch;
59pub use branch::{Branch, Local, Remote};
60
61mod tag;
62pub use tag::Tag;
63
64mod commit;
65pub use commit::{Author, Commit, Time};
66
67mod namespace;
68pub use namespace::Namespace;
69
70mod stats;
71pub use stats::Stats;
72
73mod revision;
74pub use revision::{Revision, Signature, ToCommit};
75
76mod refs;
77
78mod error;
79pub use error::Error;