summarylogtreecommitdiffstats
path: root/disable-git-checks.patch
blob: 9c8f719e8a013837cde59baf8bb717a620ec109f (plain)
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
We provide source tarballs without git functionality.
'MY_REV' gets replaced with the corresponding revision in src_prepare.
--- a/build/ninja_gen/src/git.rs
+++ b/build/ninja_gen/src/git.rs
@@ -13,7 +13,7 @@ pub struct SyncSubmodule {

 impl BuildAction for SyncSubmodule {
     fn command(&self) -> &str {
-        "git -c protocol.file.allow=always submodule update --init $path"
+        "true"
     }

     fn files(&mut self, build: &mut impl build::FilesHandle) {
--- a/build/runner/src/build.rs
+++ b/build/runner/src/build.rs
@@ -161,12 +161,7 @@ fn maybe_update_buildhash(build_root: &Utf8Path) {
 }

 fn get_buildhash() -> String {
-    let output = Command::new("git")
-        .args(["rev-parse", "--short=8", "HEAD"])
-        .output()
-        .expect("git");
-    assert!(output.status.success(), "git failed");
-    String::from_utf8(output.stdout).unwrap().trim().into()
+    String::from("MY_REV").trim().into()
 }

 fn write_if_changed(path: &Utf8Path, contents: &str) {