1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// git-dit - the distributed issue tracker for git
// Copyright (C) 2016, 2017 Matthias Beyer <mail@beyermatthias.de>
// Copyright (C) 2016, 2017 Julian Ganz <neither@nut.email>
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
#![recursion_limit = "1024"]

//! The git-dit library
//!
//! This library provides low-level functionality for accessing, creating and
//! manipulating "git-dit" issues and messages. It is implemented on top of the
//! `git2` crate. This librarie's documentation primarily provides information
//! about its API and abstract processing of issues and messages.
//!
//!
//! # Issues
//!
//! Issues are stored in git repositories. The issues availible in a repository
//! may be accessed through the `RepositoryExt` extension trait implementation
//! for `git2::Repository`.
//!
//! An issue is primarily a tree of messages, consisting of at least an initial
//! message. An issue also has a "head reference". The head reference lets the
//! maintainer indicate an "upstream status" of the issue, e.g. by pointing to a
//! message which introduces a textual solution or a state.
//!
//! # Messages
//!
//! Like emails, messages are immutable once released to the public. Each
//! message has an author and a creation date. Additionally, a message may
//! contain arbitrary metadata in the form of git trailers.
//!

#[macro_use] extern crate error_chain;
#[macro_use] extern crate lazy_static;
extern crate git2;
extern crate regex;

pub mod error;
pub mod gc;
pub mod issue;
pub mod iter;
pub mod message;
pub mod remote;
pub mod repository;
pub mod trailer;

mod utils;

#[cfg(test)]
mod test_utils;

// A selection of types are reexported for more convenient access.
pub use error::Error;
pub use issue::Issue;
pub use message::Message;
pub use remote::RemoteExt;
pub use repository::RepositoryExt;