From a6b667478034cee6efde4b0828ad4a263345355f Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 31 May 2015 17:42:12 -0700 Subject: Cloud storage: rethink the terminology used Cloud storage makes more sense that remote storage - at least I assume that more people are used to thinking about "storing things in the cloud". Don't use PIN or passphrase, call it a password everywhere. Don't use copy_string() to copy the password - the git credentials routine asserts that password is not NULL, so make sure we at least have a pointer to an empty string here. Signed-off-by: Dirk Hohndel --- git-access.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git-access.c') diff --git a/git-access.c b/git-access.c index c0e1a7710..9189ae08d 100644 --- a/git-access.c +++ b/git-access.c @@ -77,7 +77,7 @@ int credential_ssh_cb(git_cred **out, void *payload) { const char *priv_key = format_string("%s/%s", system_default_directory(), "ssrf_remote.key"); - const char *passphrase = copy_string(prefs.passphrase); + const char *passphrase = prefs.cloud_storage_password ? strdup(prefs.cloud_storage_password) : strdup(""); return git_cred_ssh_key_new(out, username_from_url, NULL, priv_key, passphrase); } @@ -88,7 +88,7 @@ int credential_https_cb(git_cred **out, void *payload) { const char *username = "ssrftest"; - const char *password = copy_string(prefs.passphrase); + const char *password = prefs.cloud_storage_password ? strdup(prefs.cloud_storage_password) : strdup(""); return git_cred_userpass_plaintext_new(out, username, password); } #endif -- cgit v1.2.3-70-g09d2