Refactor: Fix clippy warnings and introduce AppError
This commit is contained in:
1 parent
3add6c3d31
commit
4e1a633dbd
13 files changed
+129
-103
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user