Skip to content
Snippets Groups Projects

Initial implementation of an elasticsearch indexer in Go

Merged Nick Thomas requested to merge 1-initial-implementation into master
All threads resolved!
1 file
+ 5
5
Compare changes
  • Side-by-side
  • Inline
+ 5
5
@@ -15,7 +15,7 @@ var (
)
type goGitRepository struct {
Repo *git.Repository
*git.Repository
FromHash plumbing.Hash
ToHash plumbing.Hash
@@ -31,14 +31,14 @@ func NewGoGitRepository(projectPath string, fromSHA string, toSHA string) (*goGi
if err != nil {
return nil, err
}
out.Repo = repo
out.Repository = repo
if fromSHA == "" {
out.FromHash = plumbing.ZeroHash
} else {
out.FromHash = plumbing.NewHash(fromSHA)
commit, err := repo.CommitObject(out.FromHash)
commit, err := out.Repository.CommitObject(out.FromHash)
if err != nil {
return nil, fmt.Errorf("Bad from SHA (%s): %s", out.FromHash, err)
}
@@ -47,7 +47,7 @@ func NewGoGitRepository(projectPath string, fromSHA string, toSHA string) (*goGi
}
if toSHA == "" {
ref, err := out.Repo.Head()
ref, err := out.Repository.Head()
if err != nil {
return nil, err
}
@@ -57,7 +57,7 @@ func NewGoGitRepository(projectPath string, fromSHA string, toSHA string) (*goGi
out.ToHash = plumbing.NewHash(toSHA)
}
commit, err := repo.CommitObject(out.ToHash)
commit, err := out.Repository.CommitObject(out.ToHash)
if err != nil {
return nil, fmt.Errorf("Bad to SHA (%s): %s", out.ToHash, err)
}
Loading