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 <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-05-31 17:42:12 -07:00
parent 97ef9d0ee8
commit a6b6674780
5 changed files with 31 additions and 33 deletions

View file

@ -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