Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 2 additions & 52 deletions src/git/rewrite_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ pub enum RewriteLogEvent {
}

impl RewriteLogEvent {
#[allow(dead_code)]
pub fn merge(
source_branch: String,
target_branch: String,
Expand Down Expand Up @@ -112,14 +111,6 @@ impl RewriteLogEvent {
}
}

#[allow(dead_code)]
pub fn revert_mixed(event: RevertMixedEvent) -> Self {
Self::RevertMixed {
revert_mixed: event,
}
}

#[allow(dead_code)]
pub fn reset(event: ResetEvent) -> Self {
Self::Reset { reset: event }
}
Expand All @@ -136,17 +127,9 @@ impl RewriteLogEvent {
}
}

#[allow(dead_code)]
pub fn stash(event: StashEvent) -> Self {
Self::Stash { stash: event }
}

#[allow(dead_code)]
pub fn authorship_logs_synced(event: AuthorshipLogsSyncedEvent) -> Self {
Self::AuthorshipLogsSynced {
authorship_logs_synced: event,
}
}
}

/// Simple case classes - no timestamps, git already has that data
Expand All @@ -160,7 +143,6 @@ pub struct MergeEvent {
}

impl MergeEvent {
#[allow(dead_code)]
pub fn new(
source_branch: String,
target_branch: String,
Expand Down Expand Up @@ -215,15 +197,6 @@ pub struct RebaseStartEvent {
}

impl RebaseStartEvent {
#[allow(dead_code)]
pub fn new(original_head: String, is_interactive: bool) -> Self {
Self {
original_head,
is_interactive,
onto_head: None,
}
}

pub fn new_with_onto(
original_head: String,
is_interactive: bool,
Expand Down Expand Up @@ -332,16 +305,7 @@ pub struct RevertMixedEvent {
pub affected_files: Vec<String>,
}

impl RevertMixedEvent {
#[allow(dead_code)]
pub fn new(reverted_commit: String, success: bool, affected_files: Vec<String>) -> Self {
Self {
reverted_commit,
success,
affected_files,
}
}
}
impl RevertMixedEvent {}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
Expand All @@ -361,7 +325,6 @@ pub struct ResetEvent {
}

impl ResetEvent {
#[allow(dead_code)]
pub fn new(
kind: ResetKind,
keep: bool,
Expand Down Expand Up @@ -455,19 +418,7 @@ pub struct AuthorshipLogsSyncedEvent {
pub timestamp: u64,
}

impl AuthorshipLogsSyncedEvent {
#[allow(dead_code)]
pub fn new(synced: Vec<String>, origin: Vec<String>) -> Self {
Self {
synced,
origin,
timestamp: std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.unwrap()
.as_secs(),
}
}
}
impl AuthorshipLogsSyncedEvent {}

/// Stash operation types
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
Expand All @@ -487,7 +438,6 @@ pub enum StashOperation {
}

/// Serialize events to JSONL format (newest events first)
#[allow(dead_code)]
pub fn serialize_events_to_jsonl(events: &[RewriteLogEvent]) -> Result<String, serde_json::Error> {
let mut lines = Vec::new();

Expand Down
Loading