MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / diff_working_copy

Method diff_working_copy

atomic-cli/src/service/mod.rs:386–409  ·  view source on GitHub ↗

DiffWorkingCopy, collected: both backends stream; the CLI renders the whole listing.

(
        &self,
        request: pb::DiffWorkingCopyRequest,
    )

Source from the content-addressed store, hash-verified

384 /// DiffWorkingCopy, collected: both backends stream; the CLI renders
385 /// the whole listing.
386 pub fn diff_working_copy(
387 &self,
388 request: pb::DiffWorkingCopyRequest,
389 ) -> CliResult<Vec<pb::DiffChunk>> {
390 self.call(move |backend| async move {
391 match backend {
392 Backend::Local(state) => {
393 let stream = services::QueryImpl { state }
394 .diff_working_copy(Request::new(request))
395 .await?
396 .into_inner();
397 collect_chunks(Box::pin(stream)).await
398 }
399 Backend::Reactor(channel) => {
400 let mut query =
401 pb::repository_query_service_client::RepositoryQueryServiceClient::new(
402 channel,
403 );
404 let stream = query.diff_working_copy(request).await?.into_inner();
405 collect_streaming(stream).await
406 }
407 }
408 })
409 }
410
411 /// The view-pair Diff, collected (same rendering as the working copy).
412 pub fn diff(&self, request: pb::DiffRequest) -> CliResult<Vec<pb::DiffChunk>> {

Callers 1

diffFunction · 0.45

Calls 4

collect_chunksFunction · 0.85
collect_streamingFunction · 0.85
callMethod · 0.45
into_innerMethod · 0.45

Tested by

no test coverage detected