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

Method moved

atomic-core/src/record/detect.rs:504–525  ·  view source on GitHub ↗

Create a new file change for a moved file. # Arguments `new_path` - New path to the file `from_path` - Original path `inode` - File's inode `position` - Position in the graph `content_changed` - Whether content also changed `diff_ops` - Diff operations if content changed

(
        new_path: impl Into<String>,
        from_path: impl Into<String>,
        inode: Inode,
        position: Position<NodeId>,
        content_changed: bool,
        diff_ops: Option<Vec<DiffO

Source from the content-addressed store, hash-verified

502 /// * `content_changed` - Whether content also changed
503 /// * `diff_ops` - Diff operations if content changed
504 pub fn moved(
505 new_path: impl Into<String>,
506 from_path: impl Into<String>,
507 inode: Inode,
508 position: Position<NodeId>,
509 content_changed: bool,
510 diff_ops: Option<Vec<DiffOp>>,
511 ) -> Self {
512 Self {
513 path: new_path.into(),
514 inode: Some(inode),
515 position: Some(position),
516 kind: FileChangeKind::Moved {
517 from_path: from_path.into(),
518 content_changed,
519 diff_ops,
520 },
521 metadata: None,
522 size: None,
523 mtime: None,
524 }
525 }
526
527 /// Create a new file change for metadata-only changes.
528 ///

Callers

nothing calls this directly

Calls 2

iterMethod · 0.45
is_movedMethod · 0.45

Tested by

no test coverage detected