You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Merge preview errors over a graph drop instead of reporting it unmergeable #2253
A merge preview between branches where either side dropped a graph since they forked returns an error: BranchConflict, from merge::refuse_merging_graph_drops in merge_preview.rs. The merge itself refuses the same way, which is intended, since only a fast-forward can carry a drop over. The preview's job, though, is to say whether a merge would go through, and MergePreview has a mergeable field for exactly that. A client asking "can I merge?" gets an error and has to tell "no, because of a drop" apart from a real failure.
Proposal
For a non-fast-forward preview where either side dropped a graph, return the preview with mergeable: false and a reason saying a graph drop blocks it, along with whatever the rest of the preview can still compute (ancestor, ahead/behind, changes when requested).
Leave the merge and rebase refusals as they are.
Decide whether the drop also appears in the preview's change summary (the dropped graph IRIs per side), so a UI can show what blocks the merge.
Tests
The preview reports mergeable: false with the drop reason in both directions (source dropped, target dropped), and a fast-forward preview over a drop is still mergeable.
Activity