aboutsummaryrefslogtreecommitdiffstats
path: root/cache
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-12-10 20:13:49 +0100
committerMichael Muré <batolettre@gmail.com>2019-12-10 20:13:49 +0100
commitda6591e4807d6aec5f230e8a1efad1e2ef686608 (patch)
tree51ef192a080fd02a1230fd7cb7e8566710e006d2 /cache
parentf1ed857cbd3a253d77b31c0c896fdc4ade40844f (diff)
downloadgit-bug-da6591e4807d6aec5f230e8a1efad1e2ef686608.tar.gz
cmd: "user create" only assign the user identity if not set
Diffstat (limited to 'cache')
-rw-r--r--cache/repo_cache.go4
1 files changed, 4 insertions, 0 deletions
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) {