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

Method align_to_view

atomic-repository/src/repository/mod.rs:661–663  ·  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

659 /// Returns an error if the view does not exist or the pointer file
660 /// cannot be written.
661 pub fn align_to_view(&mut self, view: &str) -> Result<(), RepositoryError> {
662 self.set_current_view(view)
663 }
664
665 /// Set the current view on this handle only.
666 ///

Callers 7

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

Calls 1

set_current_viewMethod · 0.80

Tested by 1

test_list_after_switchFunction · 0.64