Skip to content

Commit b13e101

Browse files
authored
Merge pull request #147 from github/navntoft/fix-push-batch-size
Fix overlapping batches in refspec splitting
2 parents 304d301 + 291c4c6 commit b13e101

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/push/push.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,10 @@ func (pushService *pushService) createRepository() (*github.Repository, error) {
164164
}
165165

166166
func splitLargeRefSpecs(refSpecs []config.RefSpec) [][]config.RefSpec {
167+
batchSize := 25
167168
splitRefSpecs := [][]config.RefSpec{}
168-
for i := 0; i < len(refSpecs); i += 25 {
169-
end := i + 100
169+
for i := 0; i < len(refSpecs); i += batchSize {
170+
end := i + batchSize
170171
if end > len(refSpecs) {
171172
end = len(refSpecs)
172173
}

0 commit comments

Comments
 (0)