Skip to content

Feature Request: Support for rebase+no-fast-forward-merge #734

Closed

Description

@Brondahl

Reviewable is Excellent! I've not been so impressed by a review tool in a very long time!

One thing that I'd love to see is support for 1 additional option for the "Commit to Master" workflow.

I like a variant of the Rebase workflow, that looks like this:

Start from:

  • git fetch is up-to-date.
  • master == remote\master.
  • feature == remote\feature`
  • Last common ancestor of master and feature is several commits ago, on both branches.
  • feature is fully reviewed and has no merge/rebase conflicts with master.
git checkout feature
git rebase master
git checkout master
git merge -no-ff feature -m "Rebasing `feature` onto `master`"
git push

This is almost identical to the standard rebase workflow, except that the final trivial merge with master is done --no-ff.

Happy to explain why I like that gitflow if anyone wants, but I don't think that's relevant to whether it can be supported. It's the workflow that I prefer and I'd love to see it supported if that's an option?

Activity

  1. Brondahl commented on May 15, 2020

    @Brondahl
    Author

    I guess there's conceptually the option of a more general "configure an entirely custom 'Commi to Master' workflow" defined in terms of variables? I imagine that would be considerably more work, though.

  2. pkaminski commented on May 18, 2020

    @pkaminski
    Member

    From a technical point of view I think this might be possible. We'd need to use something like the tibdex/github-rebase algorithm to emulate a rebase through GitHub's API, then use the API to create an extra merge commit and update the base ref. It's not immediately clear what would happen in case of merge conflicts, but I assume some step along the way would just fail and you'd have to run the rebase from a command line instead.

    However, compared to the current "call a single API to merge with the right flag", this would be a lot of extra code for a somewhat esoteric use case so I'm not convinced the effort is warranted -- sorry. I'm happy leaving this issue open to give the idea some visibility in case others are interested in it too, and perhaps revisit in a while to see if the calculus has changed.

  3. Brondahl commented on May 18, 2020

    @Brondahl
    Author

    Oh, I think I see ... you don't currently "do the rebase yourself", you just tell GitHub to please accept this PR, with 'merge-mode' set to 'rebase'?

    Thus anything that isn't already supported by GH is a significant extra chunk of work?

    Fair enough :)
    shucks :D

  4. Brondahl commented on May 18, 2020

    @Brondahl
    Author

    Raised a feature request with GitHub :D
    Maybe it'll get added as an option in the future!

  5. pkaminski commented on May 18, 2020

    @pkaminski
    Member

    Yep, you've got it right. If you can convince GitHub to offer the feature (and surface it via the API) then we could support it easily. Otherwise, it's a ton of work. Thanks!

  6. pkaminski commented on Jan 30, 2025

    @pkaminski
    Member

    So AFAIU from this discussion, GitHub's current "rebase" merge strategy is in fact of the no-fast-forward variety. Reviewable supports this already.

    Instead, it looks like we need to support true FF merges!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions