diff options
author | Michael Muré <batolettre@gmail.com> | 2019-02-19 00:19:27 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2019-03-01 22:40:27 +0100 |
commit | 71f9290fdae7551f3d3ada2179ece4084304d734 (patch) | |
tree | 3494e4d4491012899ace256f534f5faea1ba2a88 /identity/bare.go | |
parent | ffe35fece1b1526949107f154abc21a1a02fc74d (diff) | |
download | git-bug-71f9290fdae7551f3d3ada2179ece4084304d734.tar.gz |
identity: store the times properly
Diffstat (limited to 'identity/bare.go')
-rw-r--r-- | identity/bare.go | 11 |
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 } |