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.

use origin remote by default

+7 -6
+5 -4
src/main.rs
··· 6 6 mod utils; 7 7 mod verify; 8 8 9 + use std::borrow::Cow; 9 10 use std::path::PathBuf; 10 11 11 12 use anyhow::Result; ··· 52 53 /// Push signify data to a remote repository 53 54 Push { 54 55 /// The name of the remote repository 55 - remote: String, 56 + remote: Option<Cow<'static, str>>, 56 57 }, 57 58 /// Pull signify data from a remote repository 58 59 Pull { 59 60 /// The name of the remote repository 60 - remote: String, 61 + remote: Option<Cow<'static, str>>, 61 62 }, 62 63 } 63 64 ··· 109 110 public_key, 110 111 git_rev: rev, 111 112 } => verify::command(public_key, rev), 112 - Action::Push { remote } => push::command(remote), 113 - Action::Pull { remote } => pull::command(remote), 113 + Action::Push { remote } => push::command(&remote.unwrap_or(Cow::Borrowed("origin"))), 114 + Action::Pull { remote } => pull::command(&remote.unwrap_or(Cow::Borrowed("origin"))), 114 115 } 115 116 }
+1 -1
src/pull.rs
··· 7 7 use crate::utils::ALL_SIGNIFY_REFS; 8 8 9 9 /// Execute the `pull` command. 10 - pub fn command(remote: String) -> Result<()> { 10 + pub fn command(remote: &str) -> Result<()> { 11 11 let exit_code = Command::new("git") 12 12 .arg("fetch") 13 13 .arg(remote)
+1 -1
src/push.rs
··· 7 7 use crate::utils::ALL_SIGNIFY_REFS; 8 8 9 9 /// Execute the `push` command. 10 - pub fn command(remote: String) -> Result<()> { 10 + pub fn command(remote: &str) -> Result<()> { 11 11 let exit_code = Command::new("git") 12 12 .arg("push") 13 13 .arg(remote)