Skip to content

Commit 43c3ed8

Browse files
committed
devhub: Use the actual commit sha in the devhubdb output
1 parent 81af89a commit 43c3ed8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/devhub/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::{fs::OpenOptions, path::PathBuf};
66

77
use deps::Dependencies;
88
use serde::{Deserialize, Serialize};
9-
use xshell::{Shell, cmd};
9+
use xshell::{cmd, Shell};
1010

1111
mod benchmarks;
1212
mod build_metrics;
@@ -293,6 +293,7 @@ fn run_on_commit(
293293
.unwrap_or_default()
294294
.as_secs();
295295

296+
let git_commit = cmd!(sh, "git rev-parse {commit}").read()?;
296297
let timestamp = cmd!(sh, "git log --pretty=format:%ct -1 {commit}")
297298
.read()?
298299
.parse()?;
@@ -301,7 +302,7 @@ fn run_on_commit(
301302
timestamp,
302303
metrics: vec![],
303304
attributes: Attributes {
304-
git_commit: commit.to_string(),
305+
git_commit,
305306
wall_clock_timestamp,
306307
},
307308
};

0 commit comments

Comments
 (0)