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

Method delete_empty

atomic-core/src/change/ops.rs:705–716  ·  view source on GitHub ↗

Creates a line delete operation without content. Use this when the original content is not available. The diff will show a placeholder for the deleted content.

(branch_id: BranchId)

Source from the content-addressed store, hash-verified

703 /// Use this when the original content is not available.
704 /// The diff will show a placeholder for the deleted content.
705 pub fn delete_empty(branch_id: BranchId) -> Self {
706 Self {
707 branch_id,
708 operation: BranchOp::Delete {
709 branch: branch_id,
710 content: Vec::new(),
711 },
712 old_line_num: None,
713 new_line_num: None,
714 content_range: None,
715 }
716 }
717
718 /// Creates a line restore operation.
719 pub fn restore(branch_id: BranchId) -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected