git-credential-netrc: accept gpg option
authorLuis Marsano <luis.marsano@gmail.com>
Sat, 12 May 2018 09:17:28 +0000 (05:17 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sun, 13 May 2018 23:53:08 +0000 (08:53 +0900)
commit786ef50a23cbd0e93d1e41982cfaba76801ed885
tree8b15a617ba127cb9262bc2fd1c128e5e37ed98f9
parentf07eeed123b8880b1723b1ea9d6d6f41cfb34532
git-credential-netrc: accept gpg option

git-credential-netrc was hardcoded to decrypt with 'gpg' regardless of
the gpg.program option. This is a problem on distributions like Debian
that call modern GnuPG something else, like 'gpg2'.
Set the command according to these settings in descending precedence
1. the git-credential-netrc command -g|--gpg option
2. the git gpg.program configuration option
3. the default: 'gpg'

For conformance with Documentation/CodingGuidelines
- use Git.pm for repository and global option queries
- document -g|--gpg command option in command usage
- test repository & command options
- write documentation placeholders according to main standards

Signed-off-by: Luis Marsano <luis.marsano@gmail.com>
Acked-by: Ted Zlatanov <tzz@lifelogs.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/credential/netrc/git-credential-netrc
contrib/credential/netrc/t-git-credential-netrc.sh
contrib/credential/netrc/test.command-option-gpg [new file with mode: 0755]
contrib/credential/netrc/test.git-config-gpg [new file with mode: 0755]
contrib/credential/netrc/test.netrc.gpg [new file with mode: 0644]
contrib/credential/netrc/test.pl