Refactor: Fix clippy warnings and introduce AppError

This commit is contained in:
Riz Ashraf committed 2026-09-30 20:43:28 +01:00
1 parent 3add6c3d31
commit 4e1a633dbd
13 files changed
+129 -103

No files matched your search

+2 -3
View File
@@ -27,11 +27,10 @@ impl McpTool for GetActiveWorktreeContextHandler {
let repo = git2::Repository::discover(&cwd).map_err(|e| format!("Not in a git repository: {}", e))?;
let mut branch_name = String::new();
if let Ok(head) = repo.head() {
if let Some(name) = head.shorthand() {
if let Ok(head) = repo.head()
&& let Some(name) = head.shorthand() {
branch_name = name.to_string();
}
}
let mut opts = git2::DiffOptions::new();
let mut diff = None;