Skip to content

Commit

Permalink
refactor: cloneIfRequired does not need to be public
Browse files Browse the repository at this point in the history
`cloneIfRequired` is not used outside of this package and doesn't need
to be exported.
  • Loading branch information
ZauberNerd authored and github-actions committed Mar 15, 2022
1 parent 5ced16b commit e756db2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/common/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ type NewGitCloneExecutorInput struct {
Token string
}

// CloneIfRequired ...
func CloneIfRequired(ctx context.Context, refName plumbing.ReferenceName, input NewGitCloneExecutorInput, logger log.FieldLogger) (*git.Repository, error) {
// cloneIfRequired ...
func cloneIfRequired(ctx context.Context, refName plumbing.ReferenceName, input NewGitCloneExecutorInput, logger log.FieldLogger) (*git.Repository, error) {
r, err := git.PlainOpen(input.Dir)
if err != nil {
var progressWriter io.Writer
Expand Down Expand Up @@ -285,7 +285,7 @@ func NewGitCloneExecutor(input NewGitCloneExecutorInput) Executor {
defer cloneLock.Unlock()

refName := plumbing.ReferenceName(fmt.Sprintf("refs/heads/%s", input.Ref))
r, err := CloneIfRequired(ctx, refName, input, logger)
r, err := cloneIfRequired(ctx, refName, input, logger)
if err != nil {
return err
}
Expand Down

0 comments on commit e756db2

Please sign in to comment.