Skip to content

Commit 9f6536c

Browse files
committed
Use a deterministic number of digits in rustc_tools_util commit hashes
1 parent c082bc2 commit 9f6536c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rustc_tools_util/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,11 @@ impl std::fmt::Debug for VersionInfo {
104104
#[must_use]
105105
pub fn get_commit_hash() -> Option<String> {
106106
let output = std::process::Command::new("git")
107-
.args(["rev-parse", "--short", "HEAD"])
107+
.args(["rev-parse", "HEAD"])
108108
.output()
109109
.ok()?;
110-
let stdout = output.status.success().then_some(output.stdout)?;
110+
let mut stdout = output.status.success().then_some(output.stdout)?;
111+
stdout.truncate(10);
111112
String::from_utf8(stdout).ok()
112113
}
113114

0 commit comments

Comments
 (0)