Wildly inaccurate diff for imported PR #631

Closed
opened 2026-06-25 15:12:24 +00:00 by mikem · 4 comments

Summary

An imported PR shows a wildly inaccurate diff and commit list

Details

I'm not sure how widespread this is, but I ran across this case.

koji/koji#4546/files

This PR was

  • imported from pagure
  • merged post-import via forgejo ui (worked around forge/forge#540 by pushing the branch to to the main repo)

Is this perhaps fallout from the solution to forge/forge#556 ?

### Summary An imported PR shows a wildly inaccurate diff and commit list ### Details I'm not sure how widespread this is, but I ran across this case. https://forge.fedoraproject.org/koji/koji/pulls/4546/files This PR was - imported from pagure - merged post-import via forgejo ui (worked around forge/forge#540 by pushing the branch to to the main repo) Is this perhaps fallout from the solution to forge/forge#556 ?
Author

The page claims the PR contains 40 commits changing 45 files, but the actual changes were only 5 commits changing 3 files.

*   8ef46e28e Merge pull request 'rpmdiff: fix ignore behavior' (#4546) from rpmdiff-fixes into master
|\  
| * 5895940a3 (origin/rpmdiff-fixes, rpmdiff-fixes) update index mapping to align with rpmlint
| * a73343fea fix old tests
| * 3d2cdca66 new unit tests for rpmdiff
| * 7ad862d78 fix FILEIDX values
| * 58f16dd5e fix kojihash
|/  
The page claims the PR contains 40 commits changing 45 files, but the actual changes were only 5 commits changing 3 files. ``` * 8ef46e28e Merge pull request 'rpmdiff: fix ignore behavior' (#4546) from rpmdiff-fixes into master |\ | * 5895940a3 (origin/rpmdiff-fixes, rpmdiff-fixes) update index mapping to align with rpmlint | * a73343fea fix old tests | * 3d2cdca66 new unit tests for rpmdiff | * 7ad862d78 fix FILEIDX values | * 58f16dd5e fix kojihash |/ ```
Author

Ok, I think what happened is that the fix for forge/forge#556 reset the merge_base to the original value from pagure, even though we'd already updated and merged this one. The merge_base value for this PR was reset to what pagure had.

Ok, I think what happened is that the fix for forge/forge#556 reset the merge_base to the original value from pagure, even though we'd already updated and merged this one. The merge_base value for this PR was reset to what pagure had.
Author

Another case -- koji/koji!4542

Another case -- koji/koji!4542
ryanlerch added this to the Sprint 26 project 2026-07-27 09:40:41 +00:00
Owner

@mikem — your analysis was correct. The merge_base for these two PRs was set to a stale value, causing the diff to show far more commits and changed files than the PR actually contained.

I investigated and confirmed that only these two PRs in koji/koji were affected:

To check for other affected PRs, I:

  • Searched all merged PRs in koji/koji for the same incorrect merge_base value — only these two matched
  • Cross-referenced non-release branches in the repo against merged PRs to find any others that may have been merged via the #540 workaround (pushing the branch to the main repo) — no additional cases found

The merge_base has been corrected for both PRs. The diffs and commit lists should now display accurately.

@mikem — your analysis was correct. The `merge_base` for these two PRs was set to a stale value, causing the diff to show far more commits and changed files than the PR actually contained. I investigated and confirmed that only these two PRs in koji/koji were affected: - **koji/koji#4546** (rpmdiff: fix ignore behavior) — was showing 40 commits / 45 files, should be 5 commits / 3 files - https://forge.fedoraproject.org/koji/koji/pulls/4546/files - **koji/koji#4542** (Rpmdiff doesn't correctly check hashes) — should be 1 commit - https://forge.fedoraproject.org/koji/koji/pulls/4542/files To check for other affected PRs, I: - Searched all merged PRs in koji/koji for the same incorrect `merge_base` value — only these two matched - Cross-referenced non-release branches in the repo against merged PRs to find any others that may have been merged via the #540 workaround (pushing the branch to the main repo) — no additional cases found The `merge_base` has been corrected for both PRs. The diffs and commit lists should now display accurately.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forge/forge#631
No description provided.