From 44c996127ba203ce1dfa86dd044643e92dcbcbd4 Mon Sep 17 00:00:00 2001 From: Triston Armstrong Date: Sun, 12 Jan 2025 13:11:37 -0500 Subject: [PATCH] "feat(git_grabber): generate repo description from reflog" --- src/git_grabber.rs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/git_grabber.rs b/src/git_grabber.rs index e08bbf5..05f344a 100644 --- a/src/git_grabber.rs +++ b/src/git_grabber.rs @@ -50,18 +50,10 @@ impl GitGrabber { String::from(b) } - pub fn generate_repo_desc(origin_branch: &str, local_branch: &str) -> String { + pub fn generate_repo_desc() -> String { + let curr_branch = GitGrabber::get_current_branch(); let output = Command::new("git") - .args([ - "rev-list", - "--left-right", - "--pretty=oneline", - &format!( - "{}...{}", - origin_branch.to_string(), - local_branch.to_string() - ), - ]) + .args(["reflog", "show", &curr_branch]) .output() .expect("Failed to get repo details");