Skip to content

Commit 37a822a

Browse files
committed
remove extra trailing dashes from commit shas
1 parent 185232f commit 37a822a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/toolchain/driver.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ pub(crate) fn git_cmd(path: &PathBuf, args: &[&str]) -> Result<String> {
8888
Ok(String::from_utf8(out.stdout)?.trim().to_string())
8989
}
9090

91-
// --- New shared types ---
92-
91+
#[derive(Debug)]
9392
pub(crate) struct GitContext {
9493
pub(crate) commit: String,
9594
pub(crate) tree: String,
@@ -98,8 +97,8 @@ pub(crate) struct GitContext {
9897

9998
impl GitContext {
10099
pub(crate) fn from_dir(path: &PathBuf) -> Result<Self> {
101-
let commit = git_cmd(path, &["rev-parse", "HEAD", "--"])?;
102-
let tree = git_cmd(path, &["rev-parse", "HEAD^{tree}", "--"])?;
100+
let commit = git_cmd(path, &["rev-parse", "HEAD"])?;
101+
let tree = git_cmd(path, &["rev-parse", "HEAD^{tree}"])?;
103102
let source_uri = git_cmd(path, &["remote", "get-url", "origin"]).unwrap_or_default();
104103
Ok(Self {
105104
commit,

0 commit comments

Comments
 (0)