[go: up one dir, main page]

Skip to content

Add support to git rebase --autosquash from the ui

how to reproduce

configure project:

typical flow

  • developer makes commit
  • reviewer requests changes
  • developer makes fixup! commit
  • reviewer gives approval

but merge should not be performed before the fixup commits are flattened.

doing normal rebase from UI does not reset approval, but doing git rebase -i --autosquash from commandline resets the approvals.

the enhancement

the enhancement would be to make the autosquash rebase from the UI, or gitlab able to understand that user made a push that only squashed commits, did not perform any other changes.

maybe, if it's easier to implement, is to require base branch to be exactly the same before the push after autosquash:

  1. rebase against base branch. push
  2. rebase against target branch from the ui
  3. approval is preserved

extra considerations:

  • account only diffs, or commit message, authors, any other metadata?