Skip to content

Commit a7d117b

Browse files
committed
git: better version output
1 parent 0e81674 commit a7d117b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cli.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,10 @@ pub fn get_git_version() -> String {
328328
let version = std::process::Command::new("git").arg("--version").output();
329329

330330
match version {
331-
Ok(v) => String::from_utf8_lossy(&v.stdout).replace('\n', ""),
331+
// TODO: make those replaces controllable with config
332+
Ok(v) => String::from_utf8_lossy(&v.stdout)
333+
.replace('\n', "")
334+
.replace("version ","v"),
332335
Err(_) => String::new(),
333336
}
334337
}

0 commit comments

Comments
 (0)