MCPcopy Create free account
hub / github.com/HairlessVillager/minecommit / checkout

Method checkout

minecommit/src/lib.rs:97–106  ·  view source on GitHub ↗
(self, commit: String)

Source from the content-addressed store, hash-verified

95 }
96
97 pub fn checkout(self, commit: String) -> Result<()> {
98 let mut save = LocalFsOdb::from_dir(self.save_dir.to_owned());
99 let git = LocalGitOdb::from_commit(self.storage_dir.to_owned(), commit)?;
100
101 for crafter in CrafterImpl::get_crafters(self.extra_patterns, self.ignore_patterns) {
102 crafter.unflatten(&mut save, &git)?;
103 }
104
105 Ok(())
106 }
107}

Callers 2

perform_restoreFunction · 0.80
mainFunction · 0.80

Calls 1

unflattenMethod · 0.45

Tested by

no test coverage detected