From 15aa92980239d6d61c3b0febc0407b7f63e152b3 Mon Sep 17 00:00:00 2001 From: Fabian Henneke Date: Tue, 11 Aug 2020 18:11:39 +0200 Subject: Switch to URL-based Git config and refactor Git settings (#1008) * Make Git config URL-based and refactor * Use Kotlin style null handling for string prefs * Also show an error if generated URL can't be parsed * Add some testcases for migration strategy Signed-off-by: Harsh Shandilya Co-authored-by: Harsh Shandilya --- app/src/main/java/com/zeapo/pwdstore/utils/PreferenceKeys.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'app/src/main/java/com/zeapo/pwdstore/utils/PreferenceKeys.kt') diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PreferenceKeys.kt b/app/src/main/java/com/zeapo/pwdstore/utils/PreferenceKeys.kt index 24bf2096..05fb9326 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/PreferenceKeys.kt +++ b/app/src/main/java/com/zeapo/pwdstore/utils/PreferenceKeys.kt @@ -23,16 +23,21 @@ object PreferenceKeys { const val FILTER_RECURSIVELY = "filter_recursively" const val GENERAL_SHOW_TIME = "general_show_time" const val GIT_CONFIG = "git_config" - const val GIT_CONFIG_USER_EMAIL = "git_config_user_email" - const val GIT_CONFIG_USER_NAME = "git_config_user_name" + const val GIT_CONFIG_AUTHOR_EMAIL = "git_config_user_email" + const val GIT_CONFIG_AUTHOR_NAME = "git_config_user_name" const val GIT_EXTERNAL = "git_external" const val GIT_EXTERNAL_REPO = "git_external_repo" const val GIT_REMOTE_AUTH = "git_remote_auth" + @Deprecated("Use GIT_REMOTE_URL instead") const val GIT_REMOTE_LOCATION = "git_remote_location" + @Deprecated("Use GIT_REMOTE_URL instead") const val GIT_REMOTE_PORT = "git_remote_port" const val GIT_REMOTE_PROTOCOL = "git_remote_protocol" const val GIT_DELETE_REPO = "git_delete_repo" + @Deprecated("Use GIT_REMOTE_URL instead") const val GIT_REMOTE_SERVER = "git_remote_server" + const val GIT_REMOTE_URL = "git_remote_url" + @Deprecated("Use GIT_REMOTE_URL instead") const val GIT_REMOTE_USERNAME = "git_remote_username" const val GIT_SERVER_INFO = "git_server_info" const val GIT_BRANCH_NAME = "git_branch" -- cgit v1.2.3