MCPcopy Create free account
hub / github.com/GCWing/BitFun / git_pull

Function git_pull

src/apps/desktop/src/api/git_api.rs:867–894  ·  view source on GitHub ↗
(
    state: State<'_, AppState>,
    request: GitPullRequest,
)

Source from the content-addressed store, hash-verified

865
866#[tauri::command]
867pub async fn git_pull(
868 state: State<'_, AppState>,
869 request: GitPullRequest,
870) -> Result<GitOperationResult, String> {
871 if let Some(target) = resolve_remote_git_target(&request.repository_path).await {
872 let mut args = vec!["pull".to_string()];
873 if request.params.rebase.unwrap_or(false) {
874 args.push("--rebase".to_string());
875 }
876 if let Some(remote) = request.params.remote {
877 args.push(remote);
878 }
879 if let Some(branch) = request.params.branch {
880 args.push(branch);
881 }
882 return execute_remote_git_operation(&state, &target, &args).await;
883 }
884
885 GitService::pull(&request.repository_path, request.params)
886 .await
887 .map_err(|e| {
888 error!(
889 "Failed to pull: path={}, error={}",
890 request.repository_path, e
891 );
892 format!("Failed to pull: {}", e)
893 })
894}
895
896#[tauri::command]
897pub async fn git_checkout_branch(

Callers

nothing calls this directly

Calls 3

pushMethod · 0.45

Tested by

no test coverage detected