aboutsummaryrefslogtreecommitdiffstats
path: root/identity/bare.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-02-19 00:19:27 +0100
committerMichael Muré <batolettre@gmail.com>2019-03-01 22:40:27 +0100
commit71f9290fdae7551f3d3ada2179ece4084304d734 (patch)
tree3494e4d4491012899ace256f534f5faea1ba2a88 /identity/bare.go
parentffe35fece1b1526949107f154abc21a1a02fc74d (diff)
downloadgit-bug-71f9290fdae7551f3d3ada2179ece4084304d734.tar.gz
identity: store the times properly
Diffstat (limited to 'identity/bare.go')
-rw-r--r--identity/bare.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/identity/bare.go b/identity/bare.go
index c54277a0..d3f7655a 100644
--- a/identity/bare.go
+++ b/identity/bare.go
@@ -65,6 +65,7 @@ func (i *Bare) UnmarshalJSON(data []byte) error {
return nil
}
+// Id return the Identity identifier
func (i *Bare) Id() string {
// We don't have a proper ID at hand, so let's hash all the data to get one.
// Hopefully the
@@ -84,18 +85,22 @@ func (i *Bare) Id() string {
return i.id
}
+// Name return the last version of the name
func (i *Bare) Name() string {
return i.name
}
+// Email return the last version of the email
func (i *Bare) Email() string {
return i.email
}
+// Login return the last version of the login
func (i *Bare) Login() string {
return i.login
}
+// AvatarUrl return the last version of the Avatar URL
func (i *Bare) AvatarUrl() string {
return i.avatarUrl
}
@@ -164,12 +169,14 @@ func (i *Bare) Validate() error {
// Write the identity into the Repository. In particular, this ensure that
// the Id is properly set.
-func (i *Bare) Commit(repo repository.Repo) error {
+func (i *Bare) Commit(repo repository.ClockedRepo) error {
// Nothing to do, everything is directly embedded
return nil
}
-func (i *Bare) CommitAsNeeded(repo repository.Repo) error {
+// If needed, write the identity into the Repository. In particular, this
+// ensure that the Id is properly set.
+func (i *Bare) CommitAsNeeded(repo repository.ClockedRepo) error {
// Nothing to do, everything is directly embedded
return nil
}