Harness the power of signify(1) to sign arbitrary git objects
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 24 lines 582 B view raw
1//! Push data to a remote repo. 2 3use std::process::Command; 4 5use anyhow::{anyhow, Context, Result}; 6 7use crate::utils::ALL_SIGNIFY_REFS; 8 9/// Execute the `push` command. 10pub fn command(remote: &str) -> Result<()> { 11 let exit_code = Command::new("git") 12 .arg("push") 13 .arg(remote) 14 .arg(ALL_SIGNIFY_REFS) 15 .spawn() 16 .context("Failed to spawn git command")? 17 .wait() 18 .context("Failed to wait for git command")?; 19 if exit_code.success() { 20 Ok(()) 21 } else { 22 Err(anyhow!("Exit code of git: {exit_code}")) 23 } 24}