Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Change #273846

Category ffmpeg
Changed by Kacper Michajłow <kasper93ohnoyoudont@gmail.com>
Changed at Fri 03 Jul 2026 14:24:31
Repository https://git.ffmpeg.org/ffmpeg.git
Project ffmpeg
Branch master
Revision 2e9dfa02147112f60d5415128a79b1310e4ad9f9

Comments

.forgejo/actions/rebase-pr: workaround stale `forge.event.pull_request.merge_base` value
Unfortunately, Forgejo does not update the merge-base when PR branch is
updated, the `forge.event.pull_request.merge_base` is stale value, from
the time when PR was created. We cannot relly on it, so try to infer
parent commmit of the PR from the shallow clone that we have.

This can be reproduced by:
1. `git rebase X` where X is some commit on target branch, later known
   as merge-base
2. Create PR. Notice that `forge.event.pull_request.merge_base` == `X`
3. `git rebase X^`
4. Force push the reparented branch. Notice that
   forge.event.pull_request.merge_base == X. This is invalid! X not only
   is no longer a merge-base, but it is completelly unrelated commit,
   which exists only on `target` branch, not on PR branch.
5. ????

Additionally I can say that in fact Forgejo does update the merge-base
value, but it looks like it does that AFTER the actions are run, or
maybe concurrently and there is a race there. I've observed that on 2nd
push of a PR branch, rebased on the same parent/merge-base, the reported
value is actually correct, but we cannot rely on that, because on 1st
run it's incorrect if PR branch was rebased on different parent.

For more complex PR fallback to full unshallow and merge.

While at it make git fetches verbose, so we know which commits are asked
for.

Changed files