]> Nutra Git (v1) - gamesguru/git-remote-gcrypt.git/commitdiff
GCRYPT_GPG_ARGS env var -> gcrypt.gpg-args conf
authorSean Whitton <spwhitton@spwhitton.name>
Mon, 4 Jul 2016 08:35:11 +0000 (17:35 +0900)
committerSean Whitton <spwhitton@spwhitton.name>
Mon, 4 Jul 2016 08:35:11 +0000 (17:35 +0900)
README.rst
debian/changelog
git-remote-gcrypt

index 148abadca38abefec611e17ec3bc176a02c7874e..6f0d9d71149b76870fb3ca0503a365546cd9bb4c 100644 (file)
@@ -77,6 +77,9 @@ The following ``git-config(1)`` variables are supported:
     part of the participant list. You may use the per-remote version
     to sign different remotes using different keys.
 
+``gcrypt.gpg-args``
+    The contents of this setting are passed as arguments to gpg.
+    E.g. ``--use-agent``.
 
 Environment Variables
 =====================
@@ -84,10 +87,6 @@ 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
 ========
 
index a01fb5625acd04865286c792ebdda25e85d6c885..482a472ad3727526ac568b80adb84ff0f4b4ceb0 100644 (file)
@@ -4,7 +4,7 @@ git-remote-gcrypt (1.0.0-1) UNRELEASED; urgency=medium
   * Taking over as upstream maintainer.
     Closes https://github.com/bluss/git-remote-gcrypt/issues/12
   * Remove notice about repository format potentially changing.
-  * Implement GCRYPT_GPG_ARGS environment variable (Closes: #771011).
+  * Implement gcrypt.gpg-args git config setting (Closes: #771011).
   * Respect git config gpg.program if configured.
     Thanks Christian Amsüss.
     Closes https://github.com/joeyh/git-remote-gcrypt/pull/3
index 54db70928832b0c868135c2025be98b5c670ba96..bba6a222173909d84d0793ff77de7ba3f90a8a8a 100755 (executable)
@@ -372,9 +372,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 "${GCRYPT_GPG_ARGS:-}" "$@"
+               ${GPG} --no-tty "${Conf_gpg_args:-}" "$@"
        else
-               ${GPG} "${GCRYPT_GPG_ARGS:-}" "$@"
+               ${GPG} "${Conf_gpg_args:-}" "$@"
        fi
 }
 
@@ -409,6 +409,7 @@ read_config()
                    git config --get gcrypt.participants '.+' || :)
        Conf_pubish_participants=$(git config --get --bool "remote.$NAME.gcrypt-publish-participants" '.+' ||
                git config --get --bool gcrypt.publish-participants || :)
+       Conf_gpg_args=$(git config --get gcrypt.gpg-args '.+' || :)
 
        # Figure out which keys we should encrypt to or accept signatures from
        if isnull "$conf_part" || iseq "$conf_part" simple