Skip to content

Commit

Permalink
signing: change default gpg program, add --keyid-format option accord…
Browse files Browse the repository at this point in the history
…ingly

This is the default of Git, and Debian sid doesn't install the gpg2 symlink
by default.

https://github.com/git/git/blob/v2.43.2/gpg-interface.c#L92
jj-vcs#3007 (comment)
https://packages.debian.org/bookworm/gnupg2
  • Loading branch information
yuja committed Feb 21, 2024
1 parent 6c31bab commit fc69d05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/gpg_signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl GpgBackend {
Self::new(
config
.get_string("signing.backends.gpg.program")
.unwrap_or_else(|_| "gpg2".into())
.unwrap_or_else(|_| "gpg".into())
.into(),
config
.get_bool("signing.backends.gpg.allow-expired-keys")
Expand Down Expand Up @@ -167,6 +167,7 @@ impl SigningBackend for GpgBackend {
let output = self.run(
data,
&[
"--keyid-format=long".as_ref(),
"--status-fd=1".as_ref(),
"--verify".as_ref(),
// the only reason we have those .as_refs transmuting to &OsStr everywhere
Expand Down

0 comments on commit fc69d05

Please sign in to comment.