"feat(git_grabber): generate repo description from reflog"
This commit is contained in:
parent
8715e8b753
commit
44c996127b
@ -50,18 +50,10 @@ impl GitGrabber {
|
|||||||
String::from(b)
|
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")
|
let output = Command::new("git")
|
||||||
.args([
|
.args(["reflog", "show", &curr_branch])
|
||||||
"rev-list",
|
|
||||||
"--left-right",
|
|
||||||
"--pretty=oneline",
|
|
||||||
&format!(
|
|
||||||
"{}...{}",
|
|
||||||
origin_branch.to_string(),
|
|
||||||
local_branch.to_string()
|
|
||||||
),
|
|
||||||
])
|
|
||||||
.output()
|
.output()
|
||||||
.expect("Failed to get repo details");
|
.expect("Failed to get repo details");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user