Skip to content
Snippets Groups Projects

pkg-merge-updates: Try to fast-forward before rebasing

Merged Emanuele Aina requested to merge wip/em/attempt-to-ff-before-rebase into apertis/v2023dev1
  1. Jan 29, 2022
    • Emanuele Aina's avatar
      3d7702e5
    • Emanuele Aina's avatar
      pkg-merge-updates: Try to fast-forward before rebasing · f36e681c
      Emanuele Aina authored
      
      Explicitly attempt a fast forward merge before rebasing.
      
      Currently we always try to rebase, which already doews a fast-forward
      merge when possible. The issue is that after that we incoditionally try
      to append a new changelog entry and if we're fast-forwarding we should
      **not** to that since the changelog will already have a version equal or
      newer than the one we're trying to add.
      
      By explicitly attempting a fast-forward merge and exiting early we avoid
      that issue.
      
      This has not been a particular issue so far since the mirroring
      pipeline which uses the rebasing feature does not usually trigger it
      when a fast-forward is possible and will create all the branches in
      their final state.
      
      However in some cases unrelated errors encountered during the process
      have left repositories in a inconsistent state and this change allows to
      recover cleanly from those situations.
      
      Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
      f36e681c
Loading