diff --git a/archived/git-commit/Cargo.toml b/archived/git-commit/Cargo.toml deleted file mode 100644 index 1ae0ff5..0000000 --- a/archived/git-commit/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "git-commit" -version = "0.3.0" -license = "MIT OR Apache-2.0" -edition = "2021" -authors = [ - "Alexis Sellier ", - "Fintan Halpenny ", -] -description = "A small library for parsing, displaying and creating a git commit" -keywords = ["git", "git-commit", "git-trailers", "radicle"] - -[dependencies] -thiserror = "1" - -[dependencies.git2] -version = "0.16.1" -default-features = false -features = ["vendored-libgit2"] diff --git a/archived/git-commit/src/author.rs b/archived/git-commit/src/author.rs deleted file mode 100644 index 699345e..0000000 --- a/archived/git-commit/src/author.rs +++ /dev/null @@ -1,129 +0,0 @@ -use std::{ - fmt, - num::ParseIntError, - str::{self, FromStr}, -}; - -use thiserror::Error; - -/// The data for indicating authorship of an action within a -/// [`super::Commit`]. -#[derive(Clone, Debug, PartialEq, Eq, Hash)] -pub struct Author { - /// Name corresponding to `user.name` in the git config. - /// - /// Note: this must not contain `<` or `>`. - pub name: String, - /// Email corresponding to `user.email` in the git config. - /// - /// Note: this must not contain `<` or `>`. - pub email: String, - /// The time of this author's action. - pub time: Time, -} - -/// The time of a [`Author`]'s action. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] -pub struct Time { - seconds: i64, - offset: i32, -} - -impl Time { - pub fn new(seconds: i64, offset: i32) -> Self { - Self { seconds, offset } - } - - /// Return the time, in seconds, since the epoch. - pub fn seconds(&self) -> i64 { - self.seconds - } - - /// Return the timezone offset, in minutes. - pub fn offset(&self) -> i32 { - self.offset - } -} - -impl From