summaryrefslogtreecommitdiff
path: root/contrib/credential/netrc/test.pl
AgeCommit message (Collapse)AuthorFilesLines
2018-06-18git-credential-netrc: fix exit status when tests failLibravatar Luis Marsano1-1/+3
Signed-off-by: Luis Marsano <luis.marsano@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-06-18git-credential-netrc: use in-tree Git.pm for testsLibravatar Luis Marsano1-1/+0
The netrc test.pl script calls git-credential-netrc which imports the Git module. Pass GITPERLLIB to git-credential-netrc via PERL5LIB to ensure the in-tree Git module is used for testing. Signed-off-by: Luis Marsano <luis.marsano@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-05-14git-credential-netrc: accept gpg optionLibravatar Luis Marsano1-3/+19
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>
2018-05-14git-credential-netrc: adapt to test framework for gitLibravatar Luis Marsano1-28/+44
git-credential-netrc tests did not run in a test repository. Reuse the main test framework to stage a temporary repository. To imitate Perl tests under t/ - switch to Test::More module - use File::Basename & File::Spec::Functions 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>
2013-02-25Add contrib/credentials/netrc with GPG supportLibravatar Ted Zlatanov1-0/+106
This credential helper supports multiple files, returning the first one that matches. It checks file permissions and owner. For *.gpg files, it will run GPG to decrypt the file. Signed-off-by: Ted Zlatanov <tzz@lifelogs.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>