diff options
author | root <root@localhost> | 2013-02-14 00:00:00 +0000 |
---|---|---|
committer | root <root@localhost> | 2013-02-14 00:00:00 +0000 |
commit | e26f61776187efaf72a8d75c0e6d210a5369cd77 (patch) | |
tree | 5ed09f3a79e563981d6bb531c8dd94be3675b497 /git-remote-gcrypt | |
parent | 745b893ebd275fd276fe85dacc289a1ea7f49950 (diff) | |
download | git-remote-gcrypt-e26f61776187efaf72a8d75c0e6d210a5369cd77.tar.gz |
Obey git config user.signingkey
Diffstat (limited to 'git-remote-gcrypt')
-rwxr-xr-x | git-remote-gcrypt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/git-remote-gcrypt b/git-remote-gcrypt index db47673..14a2fe8 100755 --- a/git-remote-gcrypt +++ b/git-remote-gcrypt @@ -184,6 +184,16 @@ CLEAN_FINAL() isurl gitception "$1" && git update-ref -d "$Gref" || : } +addsignkeyparam() +{ + if isnull "$Conf_signkey"; then + "$@" + else + "$@" -u "$Conf_signkey" + fi +} + + ENCRYPT() { gpg --batch --force-mdc --compress-algo none --passphrase-fd 3 -c 3<<EOF @@ -202,7 +212,7 @@ EOF # Encrypt to recipients $1 PRIVENCRYPT() { - gpg --no-default-keyring --keyring "$Conf_keyring" \ + addsignkeyparam gpg --no-default-keyring --keyring "$Conf_keyring" \ --compress-algo none -se $1 } @@ -282,6 +292,7 @@ make_new_repo() read_config() { Conf_keyring=$(git config --path gcrypt.keyring || xecho "/dev/null") + Conf_signkey=$(git config --path user.signingkey || :) } ensure_connected() |