(
state: State<'_, AppState>,
request: GitChangedFilesRequest,
)
| 1003 | |
| 1004 | #[tauri::command] |
| 1005 | pub async fn git_get_changed_files( |
| 1006 | state: State<'_, AppState>, |
| 1007 | request: GitChangedFilesRequest, |
| 1008 | ) -> Result<Vec<GitChangedFile>, String> { |
| 1009 | info!( |
| 1010 | "Getting changed Git files for repository: {}", |
| 1011 | request.repository_path |
| 1012 | ); |
| 1013 | |
| 1014 | if let Some(target) = resolve_remote_git_target(&request.repository_path).await { |
| 1015 | let output = execute_remote_git_success( |
| 1016 | &state, |
| 1017 | &target, |
| 1018 | &build_git_changed_files_args(&request.params), |
| 1019 | ) |
| 1020 | .await?; |
| 1021 | return Ok(parse_remote_name_status_output(&output)); |
| 1022 | } |
| 1023 | |
| 1024 | GitService::get_changed_files(&request.repository_path, &request.params) |
| 1025 | .await |
| 1026 | .map_err(|e| { |
| 1027 | error!("Failed to get changed Git files: {}", e); |
| 1028 | e.to_string() |
| 1029 | }) |
| 1030 | } |
| 1031 | |
| 1032 | #[tauri::command] |
| 1033 | pub async fn git_reset_files( |
nothing calls this directly
no test coverage detected