(root: PathBuf)
| 164 | } |
| 165 | |
| 166 | pub async fn init_async(root: PathBuf) -> Result<()> { |
| 167 | tokio::task::spawn_blocking(move || init(&root)) |
| 168 | .await |
| 169 | .context("git task panicked")? |
| 170 | } |
| 171 | |
| 172 | /// SHA of HEAD. Errors if the repo has no commits yet. |
| 173 | pub fn head_sha(root: &Path) -> Result<String> { |