]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/channel.rs
Rollup merge of #102871 - notriddle:notriddle/trait-impl-anchor, r=GuillaumeGomez
[rust.git] / src / bootstrap / channel.rs
index 363556c1edeaebf77bb2a183a067de23f9b34f95..258352a21a4ad76a2bc4582b4ed5dba919b64700 100644 (file)
@@ -150,3 +150,8 @@ pub fn write_commit_info_file(root: &Path, info: &Info) {
     let commit_info = format!("{}\n{}\n{}\n", info.sha, info.short_sha, info.commit_date);
     t!(fs::write(root.join("git-commit-info"), &commit_info));
 }
+
+/// Write the commit hash to the `git-commit-hash` file given the project root.
+pub fn write_commit_hash_file(root: &Path, sha: &str) {
+    t!(fs::write(root.join("git-commit-hash"), sha));
+}