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

Method push

src/git_chain/operations.rs:270–283  ·  view source on GitHub ↗
(&self, chain_name: &str, force_push: bool)

Source from the content-addressed store, hash-verified

268 Ok(())
269 }
270 pub fn push(&self, chain_name: &str, force_push: bool) -> Result<(), Error> {
271 if Chain::chain_exists(self, chain_name)? {
272 let chain = Chain::get_chain(self, chain_name)?;
273
274 let branches_pushed = chain.push(self, force_push)?;
275
276 println!("Pushed {} branches.", format!("{}", branches_pushed).bold());
277 } else {
278 eprintln!("Unable to push branches of the chain.");
279 eprintln!("Chain does not exist: {}", chain_name);
280 process::exit(1);
281 }
282 Ok(())
283 }
284 pub fn prune(&self, chain_name: &str, dry_run: bool) -> Result<(), Error> {
285 if Chain::chain_exists(self, chain_name)? {
286 let chain = Chain::get_chain(self, chain_name)?;

Callers 5

rebaseMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected