From da6591e4807d6aec5f230e8a1efad1e2ef686608 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Tue, 10 Dec 2019 20:13:49 +0100 Subject: cmd: "user create" only assign the user identity if not set --- cache/repo_cache.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cache') diff --git a/cache/repo_cache.go b/cache/repo_cache.go index ec4cf436..90a489c8 100644 --- a/cache/repo_cache.go +++ b/cache/repo_cache.go @@ -877,6 +877,10 @@ func (c *RepoCache) GetUserIdentity() (*IdentityCache, error) { return cached, nil } +func (c *RepoCache) IsUserIdentitySet() (bool, error) { + return identity.IsUserIdentitySet(c.repo) +} + // NewIdentity create a new identity // The new identity is written in the repository (commit) func (c *RepoCache) NewIdentity(name string, email string) (*IdentityCache, error) { -- cgit