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

Method align_to_view

atomic-repository/src/repository/mod.rs:677–679  ·  view source on GitHub ↗

Align the view pointer without materializing the working copy. This persists the new view name to `.atomic/current_view` so that subsequent `status()`, `add()`, and `record()` calls target the correct view, but it does **not** add, remove, or update any files on disk. Use this only when the caller will immediately populate the working copy itself (e.g. the agent record hook, which creates files

(&mut self, view: &str)

Source from the content-addressed store, hash-verified

675 /// Returns an error if the view does not exist or the pointer file
676 /// cannot be written.
677 pub fn align_to_view(&mut self, view: &str) -> Result<(), RepositoryError> {
678 self.align_deferred_tree_and_publish_view(view).map(|_| ())
679 }
680
681 /// Set the current view on this handle only.
682 ///

Callers 8

runMethod · 0.80
runMethod · 0.80
run_asyncMethod · 0.80
test_list_after_switchFunction · 0.80
record_turnFunction · 0.80
handle_session_endMethod · 0.80
handle_session_startMethod · 0.80

Tested by 1

test_list_after_switchFunction · 0.64