(
state: State<'_, AppState>,
request: GitCommitsRequest,
)
| 744 | |
| 745 | #[tauri::command] |
| 746 | pub async fn git_get_commits( |
| 747 | state: State<'_, AppState>, |
| 748 | request: GitCommitsRequest, |
| 749 | ) -> Result<Vec<GitCommit>, String> { |
| 750 | let params = request.params.unwrap_or_default(); |
| 751 | if let Some(target) = resolve_remote_git_target(&request.repository_path).await { |
| 752 | let output = execute_remote_git_success(&state, &target, &git_log_args(¶ms)).await?; |
| 753 | return Ok(parse_remote_commits(&output)); |
| 754 | } |
| 755 | |
| 756 | GitService::get_commits(&request.repository_path, params) |
| 757 | .await |
| 758 | .map_err(|e| { |
| 759 | error!( |
| 760 | "Failed to get Git commits: path={}, error={}", |
| 761 | request.repository_path, e |
| 762 | ); |
| 763 | format!("Failed to get Git commits: {}", e) |
| 764 | }) |
| 765 | } |
| 766 | |
| 767 | #[tauri::command] |
| 768 | pub async fn git_add_files( |
nothing calls this directly
no test coverage detected