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.

improve cli docs

+11 -11
+7 -7
src/main.rs
··· 25 25 #[arg(short = 'k', long)] 26 26 secret_key: PathBuf, 27 27 28 - /// The object id to sign 29 - git_object_id: String, 28 + /// The git revision to sign 29 + git_rev: String, 30 30 }, 31 31 /// Verify the signature contained in a tree object 32 32 Verify { ··· 39 39 print_signed_oid: bool, 40 40 41 41 /// The git tree containing a signed object 42 - git_tree_oid: String, 42 + git_tree: String, 43 43 }, 44 44 /// Hash a key and return it 45 45 Fingerprint { ··· 55 55 match args.action { 56 56 Action::Sign { 57 57 secret_key, 58 - git_object_id: oid, 59 - } => sign::command(secret_key, oid), 58 + git_rev: rev, 59 + } => sign::command(secret_key, rev), 60 60 Action::Verify { 61 61 public_key, 62 62 print_signed_oid: recover, 63 - git_tree_oid: oid, 64 - } => verify::command(public_key, recover, oid), 63 + git_tree: rev, 64 + } => verify::command(public_key, recover, rev), 65 65 Action::Fingerprint { key } => fingerprint::command(key), 66 66 } 67 67 }
+2 -2
src/sign.rs
··· 9 9 use super::utils; 10 10 11 11 /// Execute the `sign` command. 12 - pub fn command(key_path: PathBuf, oid: String) -> Result<()> { 12 + pub fn command(key_path: PathBuf, rev: String) -> Result<()> { 13 13 let repo = Repository::open(".").context("Failed to open git repository")?; 14 14 15 15 let oid = repo 16 - .revparse_single(&oid) 16 + .revparse_single(&rev) 17 17 .context("Failed to look-up git object id")? 18 18 .id(); 19 19
+2 -2
src/verify.rs
··· 9 9 use super::utils; 10 10 11 11 /// Execute the `verify` command. 12 - pub fn command(key_path: PathBuf, recover: bool, oid: String) -> Result<()> { 12 + pub fn command(key_path: PathBuf, recover: bool, tree_rev: String) -> Result<()> { 13 13 let repo = Repository::open(".").context("Failed to open git repository")?; 14 14 15 15 let oid = repo 16 - .revparse_single(&oid) 16 + .revparse_single(&tree_rev) 17 17 .context("Failed to look-up git tree oid")? 18 18 .id(); 19 19 let tree = repo