Skip to content

Commit

Permalink
Merge pull request #68 from lafriks/patch-1
Browse files Browse the repository at this point in the history
make filer.FromGit exported
  • Loading branch information
vmarkovtsev authored Feb 19, 2020
2 parents e39156e + 98fc459 commit 4f5dc53
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions licensedb/filer/filer.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ func FromGitURL(url string) (Filer, error) {
if err != nil {
return nil, errors.Wrapf(err, "could not clone repo from %s", url)
}
return fromGit(repo, "")
return FromGit(repo, "")
}

func fromGit(repo *git.Repository, headRef plumbing.ReferenceName) (Filer, error) {
// FromGit returns a Filer that allows accessing all the files in a Git repository
func FromGit(repo *git.Repository, headRef plumbing.ReferenceName) (Filer, error) {
var head *plumbing.Reference
var err error
if headRef == "" {
Expand Down Expand Up @@ -242,7 +243,7 @@ func FromSiva(path string) (Filer, error) {
if err != nil {
return nil, errors.Wrapf(err, "failed to iterate over references in Siva file %s", path)
}
return fromGit(repo, head)
return FromGit(repo, head)
}

type zipNode struct {
Expand Down

0 comments on commit 4f5dc53

Please sign in to comment.