@@ -93,17 +93,20 @@
     stdin.flush().await?;

     let output = child.output().await.context("reading git blame output")?;
+    handle_command_output(&output)?;
+    Ok(String::from_utf8(output.stdout)?)
+}

+fn handle_command_output(output: &std::process::Output) -> Result<()> {
     if !output.status.success() {
         let stderr = String::from_utf8_lossy(&output.stderr);
         let trimmed = stderr.trim();
         if trimmed == GIT_BLAME_NO_COMMIT_ERROR || trimmed.contains(GIT_BLAME_NO_PATH) {
-            return Ok(String::new());
+            return Ok(());
         }
         anyhow::bail!("git blame process failed: {stderr}");
     }
-
-    Ok(String::from_utf8(output.stdout)?)
+    Ok(())
 }

 #[derive(Serialize, Deserialize, Default, Debug, Clone, PartialEq, Eq)]
