feat: remove author and hash commit

main
hau 2020-11-09 10:46:08 +07:00
parent 5b5d186805
commit 0fe1c6795e
1 changed files with 0 additions and 12 deletions

View File

@ -3,23 +3,11 @@ package git
import "github.com/go-git/go-git/v5/plumbing/object" import "github.com/go-git/go-git/v5/plumbing/object"
type Commit struct { type Commit struct {
Hash string
Author Author
Message string Message string
} }
type Author struct {
Name string
Email string
}
func newCommit(commit *object.Commit) Commit { func newCommit(commit *object.Commit) Commit {
return Commit{ return Commit{
Hash: commit.Hash.String(),
Author: Author{
Name: commit.Author.Name,
Email: commit.Author.Email,
},
Message: commit.Message, Message: commit.Message,
} }
} }