-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a scheduled workflow to synchronize branches from gitster/git
#2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still in progress but I have to step away for a bit.
} else if (c === 0 && sourceRefs[i].object.sha !== targetRefs[j].object.sha) { | ||
// target ref needs updating | ||
const sha = sourceRefs[i].object.sha | ||
toFetch.add(sha) | ||
refspecs.push(`+${sha}:${sourceRefs[i++].ref}`) | ||
j++ | ||
} else { | ||
i++ | ||
j++ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a little clearer on the increments?
} else { // they are a match
if (sourceRefs[i].object.sha !== targetRefs[j].object.sha) {
// target ref needs updating
const sha = sourceRefs[i].object.sha
toFetch.add(sha)
refspecs.push(`+${sha}:${sourceRefs[i].ref}`)
}
i++
j++
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
The Git maintainer publishes only the integration branches to `git/git`, leaving the individual contribution branches in `gitster/git`. We do want to make sure that the latter branches are available, and synchronized, in `gitgitgadget/git`, to facilitate contributions to patch series that are in flight. So let's synchronize the branches, making sure that the integration branches (`maint`, `master`, `next`, `seen`) are not synchronized from `gitster/git`; They are synchronized via the `sync-ref` workflow already. Signed-off-by: Johannes Schindelin <[email protected]>
There are a lot of branches in `gitster/git`. A _lot_. So let's be nice to GitHub and back off (but do try again) if encountering a 502 (which indicates that GitHub is as overloaded as the rest of us). Signed-off-by: Johannes Schindelin <[email protected]>
It does not make sense to try synchronizing in parallel. I considered adding `cancel-in-progress: true`, but that strikes me as wasteful: if we're already pushing an update, canceling it would require the entire work to be done again, while chances are that any queued run will likely find that everything is already up to date and no further work needs to be done. Signed-off-by: Johannes Schindelin <[email protected]>
e2422e2
to
525752b
Compare
@webstech here is another iteration of this PR. Range-diff to what you reviewed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
This ports over https://dev.azure.com/gitgitgadget/git/_build?definitionId=8 from an Azure Pipeline to a GitHub workflow.