MCPcopy Create free account
hub / github.com/dashed/git-chain / rename

Method rename

src/chain.rs:356–370  ·  view source on GitHub ↗
(self, git_chain: &GitChain, new_chain_name: &str)

Source from the content-addressed store, hash-verified

354 }
355
356 pub fn rename(self, git_chain: &GitChain, new_chain_name: &str) -> Result<(), Error> {
357 // invariant: new_chain_name chain does not exist
358 assert!(!Chain::chain_exists(git_chain, new_chain_name)?);
359
360 for branch in self.branches {
361 Branch::setup_branch(
362 git_chain,
363 new_chain_name,
364 &branch.root_branch,
365 &branch.branch_name,
366 &SortBranch::Last,
367 )?;
368 }
369 Ok(())
370 }
371}

Calls

no outgoing calls