Skip to content

Commit

Permalink
Fix bug in loadTasks
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbelamaric committed Nov 28, 2023
1 parent fa49ede commit 4133148
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions porch/pkg/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,12 @@ func (r *gitRepository) loadTasks(ctx context.Context, startCommit *object.Commi

var tasks []v1alpha1.Task

done := false
visitCommit := func(commit *object.Commit) error {
if done {
return nil
}

gitAnnotations, err := ExtractGitAnnotations(commit)
if err != nil {
return err
Expand All @@ -1202,6 +1207,7 @@ func (r *gitRepository) loadTasks(ctx context.Context, startCommit *object.Commi
if gitAnnotation.Task != nil && (gitAnnotation.Task.Type == v1alpha1.TaskTypeClone || gitAnnotation.Task.Type == v1alpha1.TaskTypeInit) {
// we have reached the beginning of this package revision and don't need to
// continue further
done = true
break
}
}
Expand Down

0 comments on commit 4133148

Please sign in to comment.