diff options
author | Michael Muré <batolettre@gmail.com> | 2020-07-01 19:39:02 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2020-07-01 19:39:02 +0200 |
commit | 3cf31fc4049fefc82db0a3d2018b5d98ab77c5d7 (patch) | |
tree | c77a29e1f35fefa5040454976c6edcf86e7678bc /identity | |
parent | 33d510ac3999b3d8fa7a4652dc44a21c713f97de (diff) | |
download | git-bug-3cf31fc4049fefc82db0a3d2018b5d98ab77c5d7.tar.gz |
repository: merge git.Hash in for one less /util package
Diffstat (limited to 'identity')
-rw-r--r-- | identity/identity.go | 5 | ||||
-rw-r--r-- | identity/version.go | 8 |
2 files changed, 6 insertions, 7 deletions
diff --git a/identity/identity.go b/identity/identity.go index d6504c52..bf0e853c 100644 --- a/identity/identity.go +++ b/identity/identity.go @@ -13,7 +13,6 @@ import ( "github.com/MichaelMure/git-bug/entity" "github.com/MichaelMure/git-bug/repository" - "github.com/MichaelMure/git-bug/util/git" "github.com/MichaelMure/git-bug/util/lamport" "github.com/MichaelMure/git-bug/util/timestamp" ) @@ -40,7 +39,7 @@ type Identity struct { versions []*Version // not serialized - lastCommit git.Hash + lastCommit repository.Hash } func NewIdentity(name string, email string) *Identity { @@ -357,7 +356,7 @@ func (i *Identity) Commit(repo repository.ClockedRepo) error { return err } - var commitHash git.Hash + var commitHash repository.Hash if i.lastCommit != "" { commitHash, err = repo.StoreCommitWithParent(treeHash, i.lastCommit) } else { diff --git a/identity/version.go b/identity/version.go index 2359bd11..8b6a7c24 100644 --- a/identity/version.go +++ b/identity/version.go @@ -6,11 +6,11 @@ import ( "fmt" "strings" + "github.com/pkg/errors" + "github.com/MichaelMure/git-bug/repository" - "github.com/MichaelMure/git-bug/util/git" "github.com/MichaelMure/git-bug/util/lamport" "github.com/MichaelMure/git-bug/util/text" - "github.com/pkg/errors" ) const formatVersion = 1 @@ -45,7 +45,7 @@ type Version struct { metadata map[string]string // Not serialized - commitHash git.Hash + commitHash repository.Hash } type VersionJSON struct { @@ -174,7 +174,7 @@ func (v *Version) Validate() error { // Write will serialize and store the Version as a git blob and return // its hash -func (v *Version) Write(repo repository.Repo) (git.Hash, error) { +func (v *Version) Write(repo repository.Repo) (repository.Hash, error) { // make sure we don't write invalid data err := v.Validate() if err != nil { |