File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1118,7 +1118,12 @@ func (r *gitRepository) loadTasks(ctx context.Context, startCommit *object.Commi
1118
1118
1119
1119
var tasks []v1alpha1.Task
1120
1120
1121
+ done := false
1121
1122
visitCommit := func (commit * object.Commit ) error {
1123
+ if done {
1124
+ return nil
1125
+ }
1126
+
1122
1127
gitAnnotations , err := ExtractGitAnnotations (commit )
1123
1128
if err != nil {
1124
1129
return err
@@ -1143,6 +1148,7 @@ func (r *gitRepository) loadTasks(ctx context.Context, startCommit *object.Commi
1143
1148
if gitAnnotation .Task != nil && (gitAnnotation .Task .Type == v1alpha1 .TaskTypeClone || gitAnnotation .Task .Type == v1alpha1 .TaskTypeInit ) {
1144
1149
// we have reached the beginning of this package revision and don't need to
1145
1150
// continue further
1151
+ done = true
1146
1152
break
1147
1153
}
1148
1154
}
You can’t perform that action at this time.
0 commit comments