aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2016-01-17 22:05:54 -0700
committerSean Whitton <spwhitton@spwhitton.name>2016-01-17 22:05:54 -0700
commiteefd875b9cee04232de5f62f6cb74963a0e45912 (patch)
tree2c4a2ac5ccf97dedff10a0bdaef55f1445a1b7f5
parent663c91a6438be273059beb3d96fff8bdda14b4a2 (diff)
downloadgit-remote-gcrypt-eefd875b9cee04232de5f62f6cb74963a0e45912.tar.gz
implement GCRYPT_GPG_ARGS
-rw-r--r--README.rst4
-rw-r--r--debian/changelog1
-rwxr-xr-xgit-remote-gcrypt4
3 files changed, 7 insertions, 2 deletions
diff --git a/README.rst b/README.rst
index b2f8285..148abad 100644
--- a/README.rst
+++ b/README.rst
@@ -84,6 +84,10 @@ Environment Variables
*GCRYPT_FULL_REPACK*
This environment variable forces full repack when pushing.
+*GCRYPT_GPG_ARGS*
+ The contents of this environment variable are passed as arguments
+ to gpg. E.g. ``export GCRYPT_GPG_ARGS="--use-agent"``.
+
Examples
========
diff --git a/debian/changelog b/debian/changelog
index 0933897..18bfbac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ git-remote-gcrypt (1.0.0) UNRELEASED; urgency=medium
* Switch to Debian-native package: taking over as upstream.
* Remove notice about repository format potentially changing.
+ * Implement GCRYPT_GPG_ARGS environment variable (Closes: #771011).
-- Sean Whitton <spwhitton@spwhitton.name> Sun, 17 Jan 2016 19:12:42 -0700
diff --git a/git-remote-gcrypt b/git-remote-gcrypt
index 6c93a3c..94a3d13 100755
--- a/git-remote-gcrypt
+++ b/git-remote-gcrypt
@@ -371,9 +371,9 @@ rungpg()
# due to trying to print messages to it, even if a gpg agent is set
# up. --no-tty fixes this.
if [ "x$GPG_AGENT_INFO" != "x" ]; then
- gpg --no-tty "$@"
+ gpg --no-tty "${GCRYPT_GPG_ARGS:-}" "$@"
else
- gpg "$@"
+ gpg "${GCRYPT_GPG_ARGS:-}" "$@"
fi
}