feat: run "git show" to show the commit being built

Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
Lars Wirzenius
2024-03-31 16:40:28 +03:00
parent 8c74e710b2
commit 89f0b970e3
+6
View File
@@ -135,6 +135,7 @@ impl Run {
let src = self.src.to_path_buf();
self.git_clone(&repo_path, &src)?;
self.git_checkout(commit, &src)?;
self.git_show(commit, &src)?;
let runspec_path = self.src.join(RUNSPEC_PATH);
let runspec = match RunSpec::from_file(&runspec_path) {
@@ -181,6 +182,11 @@ impl Run {
Ok(())
}
fn git_show(&mut self, commit: Oid, src: &Path) -> Result<(), RunError> {
self.runcmd(&["git", "show", &commit.to_string()], src)?;
Ok(())
}
// Run an external command in a directory. Log the command and the
// result of running it to the run log. Return an error if the
// command could not be executed at all, but the exit code if it