aboutsummaryrefslogtreecommitdiffstats
path: root/entities/identity/identity_user.go
diff options
context:
space:
mode:
authorKalin Staykov <k.t.staykov@gmail.com>2022-11-26 15:49:59 +0200
committerMichael Muré <batolettre@gmail.com>2023-01-11 14:58:58 +0100
commitfc266b733cf0ea794209031e3500ab3f86db6cee (patch)
treebae1996ec19fb74446429200e52cdb942f60ac54 /entities/identity/identity_user.go
parent9c50a359704f4edd2f33df6d256e032feae3a576 (diff)
downloadgit-bug-fc266b733cf0ea794209031e3500ab3f86db6cee.tar.gz
add wipe sub-command that remove local bugs and identities
Diffstat (limited to 'entities/identity/identity_user.go')
-rw-r--r--entities/identity/identity_user.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/entities/identity/identity_user.go b/entities/identity/identity_user.go
index 7eb374d4..f9e39bb2 100644
--- a/entities/identity/identity_user.go
+++ b/entities/identity/identity_user.go
@@ -15,6 +15,10 @@ func SetUserIdentity(repo repository.RepoConfig, identity *Identity) error {
return repo.LocalConfig().StoreString(identityConfigKey, identity.Id().String())
}
+func ClearUserIdentity(repo repository.RepoConfig) error {
+ return repo.LocalConfig().RemoveAll(identityConfigKey)
+}
+
// GetUserIdentity read the current user identity, set with a git config entry
func GetUserIdentity(repo repository.Repo) (*Identity, error) {
id, err := GetUserIdentityId(repo)