diff -Naur gitui-0.26.2.old/build.rs gitui-0.26.2/build.rs --- gitui-0.26.2.old/build.rs 2024-05-18 11:54:21.421351742 +0200 +++ gitui-0.26.2/build.rs 2024-05-18 11:59:51.821050430 +0200 @@ -1,24 +1,5 @@ use chrono::TimeZone; -fn get_git_hash() -> String { - use std::process::Command; - - let commit = Command::new("git") - .arg("rev-parse") - .arg("--short") - .arg("--verify") - .arg("HEAD") - .output(); - if let Ok(commit_output) = commit { - let commit_string = - String::from_utf8_lossy(&commit_output.stdout); - - return commit_string.lines().next().unwrap_or("").into(); - } - - panic!("Can not get git commit: {}", commit.unwrap_err()); -} - fn main() { let now = match std::env::var("SOURCE_DATE_EPOCH") { Ok(val) => chrono::Local @@ -29,14 +10,9 @@ let build_date = now.date_naive(); let build_name = if std::env::var("GITUI_RELEASE").is_ok() { - format!( - "{} {} ({})", - env!("CARGO_PKG_VERSION"), - build_date, - get_git_hash() - ) + format!("{} {}", env!("CARGO_PKG_VERSION"), build_date) } else { - format!("nightly {} ({})", build_date, get_git_hash()) + format!("nightly {}", build_date) }; println!("cargo:warning=buildname '{}'", build_name);