summaryrefslogtreecommitdiff
path: root/devel/gitui/files/patch-build.rs
blob: 5084cd16837c1acaaf4d5a1d936c790eed97df5a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- build.rs.orig	2024-06-02 12:49:32 UTC
+++ build.rs
@@ -1,27 +1,7 @@ fn get_git_hash() -> String {
 use chrono::TimeZone;
 
 fn get_git_hash() -> String {
-	use std::process::Command;
-
-	// Allow builds from `git archive` generated tarballs if output of `git get-tar-commit-id` is
-	// set in an env var.
-	if let Ok(commit) = std::env::var("BUILD_GIT_COMMIT_ID") {
-		return commit[..7].to_string();
-	};
-	let commit = Command::new("git")
-		.arg("rev-parse")
-		.arg("--short=7")
-		.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());
+	return format!("n/a");
 }
 
 fn main() {