(
state: State<'_, AppState>,
request: GitDiffRequest,
)
| 982 | |
| 983 | #[tauri::command] |
| 984 | pub async fn git_get_diff( |
| 985 | state: State<'_, AppState>, |
| 986 | request: GitDiffRequest, |
| 987 | ) -> Result<String, String> { |
| 988 | if let Some(target) = resolve_remote_git_target(&request.repository_path).await { |
| 989 | return execute_remote_git_success(&state, &target, &build_git_diff_args(&request.params)) |
| 990 | .await; |
| 991 | } |
| 992 | |
| 993 | GitService::get_diff(&request.repository_path, &request.params) |
| 994 | .await |
| 995 | .map_err(|e| { |
| 996 | error!( |
| 997 | "Failed to get Git diff: path={}, error={}", |
| 998 | request.repository_path, e |
| 999 | ); |
| 1000 | format!("Failed to get Git diff: {}", e) |
| 1001 | }) |
| 1002 | } |
| 1003 | |
| 1004 | #[tauri::command] |
| 1005 | pub async fn git_get_changed_files( |
nothing calls this directly
no test coverage detected