(root: PathBuf, msg: String, files: Vec<String>)
| 155 | } |
| 156 | |
| 157 | pub async fn commit_files_async(root: PathBuf, msg: String, files: Vec<String>) -> Result<()> { |
| 158 | tokio::task::spawn_blocking(move || { |
| 159 | let refs: Vec<&str> = files.iter().map(String::as_str).collect(); |
| 160 | commit_files(&root, &msg, &refs) |
| 161 | }) |
| 162 | .await |
| 163 | .context("git task panicked")? |
| 164 | } |
| 165 | |
| 166 | pub async fn init_async(root: PathBuf) -> Result<()> { |
| 167 | tokio::task::spawn_blocking(move || init(&root)) |
no test coverage detected
searching dependent graphs…