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

Function execute_remote_git_operation

src/apps/desktop/src/api/git_api.rs:103–128  ·  view source on GitHub ↗
(
    state: &AppState,
    target: &RemoteGitTarget,
    args: &[String],
)

Source from the content-addressed store, hash-verified

101}
102
103async fn execute_remote_git_operation(
104 state: &AppState,
105 target: &RemoteGitTarget,
106 args: &[String],
107) -> Result<GitOperationResult, String> {
108 let output = execute_remote_git_command(state, target, args).await?;
109 let success = output.exit_code == 0;
110 let error = (!success).then(|| {
111 if output.stderr.trim().is_empty() {
112 output.stdout.trim().to_string()
113 } else {
114 output.stderr.trim().to_string()
115 }
116 });
117
118 Ok(GitOperationResult {
119 success,
120 data: Some(serde_json::json!({
121 "remoteExecution": true,
122 "exitCode": output.exit_code,
123 })),
124 error,
125 output: Some(output.stdout),
126 duration: None,
127 })
128}
129
130fn parse_remote_status_line(
131 line: &str,

Callers 12

git_add_filesFunction · 0.85
git_commitFunction · 0.85
git_pushFunction · 0.85
git_pullFunction · 0.85
git_checkout_branchFunction · 0.85
git_create_branchFunction · 0.85
git_delete_branchFunction · 0.85
git_reset_filesFunction · 0.85
git_reset_to_commitFunction · 0.85
git_cherry_pickFunction · 0.85
git_cherry_pick_abortFunction · 0.85
git_cherry_pick_continueFunction · 0.85

Calls 3

trimMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected