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

Method diff_working_copy

atomic-cli/src/service/mod.rs:388–411  ·  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

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

Callers 1

diffFunction · 0.45

Calls 5

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

Tested by

no test coverage detected