mirror of
https://github.com/git/git.git
synced 2024-04-30 11:55:12 +02:00
e2770979fe
If you access repositories over smart-http using http authentication, then it can be annoying to have git ask you for your password repeatedly. We cache credentials in memory, of course, but git is composed of many small programs. Having to input your password for each one can be frustrating. This patch introduces a credential helper that will cache passwords in memory for a short period of time. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
19 lines
484 B
Bash
Executable File
19 lines
484 B
Bash
Executable File
#!/bin/sh
|
|
|
|
test_description='credential-cache tests'
|
|
. ./test-lib.sh
|
|
. "$TEST_DIRECTORY"/lib-credential.sh
|
|
|
|
# don't leave a stale daemon running
|
|
trap 'code=$?; git credential-cache exit; (exit $code); die' EXIT
|
|
|
|
helper_test cache
|
|
helper_test_timeout cache --timeout=1
|
|
|
|
# we can't rely on our "trap" above working after test_done,
|
|
# as test_done will delete the trash directory containing
|
|
# our socket, leaving us with no way to access the daemon.
|
|
git credential-cache exit
|
|
|
|
test_done
|