Gets the SHA of the current commit.
(&self)
| 61 | |
| 62 | /// Gets the SHA of the current commit. |
| 63 | pub fn get_current_commit(&self) -> Result<String> { |
| 64 | let output = self |
| 65 | .run_git_command(&["rev-parse", "HEAD"]) |
| 66 | .context("Failed to get current commit")?; |
| 67 | |
| 68 | Ok(output.trim().to_string()) |
| 69 | } |
| 70 | |
| 71 | /// Runs a git command in the repository directory. |
| 72 | pub fn run_git_command(&self, args: &[&str]) -> Result<String> { |
no test coverage detected