From 89f0b970e33e9fec7db81660a48e8b182161938b Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 31 Mar 2024 16:40:28 +0300 Subject: [PATCH] feat: run "git show" to show the commit being built Signed-off-by: Lars Wirzenius --- src/run.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/run.rs b/src/run.rs index 350d333..7b0df71 100644 --- a/src/run.rs +++ b/src/run.rs @@ -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