Skip to content
Snippets Groups Projects
Commit 977c0195 authored by Nick Thomas's avatar Nick Thomas
Browse files

Rename Repo to Repository

parent 258774eb
No related branches found
No related tags found
1 merge request!1Initial implementation of an elasticsearch indexer in Go
Loading
Loading
@@ -15,7 +15,7 @@ var (
)
 
type goGitRepository struct {
Repo *git.Repository
*git.Repository
 
FromHash plumbing.Hash
ToHash plumbing.Hash
Loading
Loading
@@ -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)
}
Loading
Loading
@@ -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
}
Loading
Loading
@@ -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
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment