MCPcopy Create free account
hub / github.com/AI45Lab/Code / checkout

Method checkout

core/src/workspace/remote_git.rs:569–585  ·  view source on GitHub ↗
(
        &self,
        request: WorkspaceGitCheckoutRequest,
    )

Source from the content-addressed store, hash-verified

567 }
568
569 async fn checkout(
570 &self,
571 request: WorkspaceGitCheckoutRequest,
572 ) -> Result<WorkspaceGitCheckoutOutput> {
573 let resp: CheckoutResp = self
574 .post_json(
575 "checkout",
576 &CheckoutReq {
577 refspec: &request.refspec,
578 force: request.force,
579 },
580 )
581 .await?;
582 Ok(WorkspaceGitCheckoutOutput {
583 stdout: resp.stdout,
584 })
585 }
586
587 async fn diff(&self, request: WorkspaceGitDiffRequest) -> Result<String> {
588 // Two-layered defence against a misbehaving gitserver:

Callers 2

checkout_returns_stdoutFunction · 0.45

Calls 1

post_jsonMethod · 0.80

Tested by

no test coverage detected