Skip to content

Handling fixup commits #48

Open
Open
@vorner

Description

@vorner

Hello

I find the git fixup commits quite useful.

For those who are not used to them, this is how it works:

  • I create a pull request.
  • There are some nitpicks in the review.
  • The nitpicks don't deserve a full commit to fix. But I also don't want to rebase the branch during the review, as that makes reviewing a bit harder. I want to just push a little commit with the fixes. This can be created by git commit -a --fixup=THE-COMMIT-TO-BE-FIXED.
  • After the whole review is concluded, I do git rebase --interactive --autosquash THE-BRANCH_COMMIT. This'll squash the fixup commits into the commits they fix up. Note that this doesn't necessarily squash the whole branch into one commit.

However, such flow seems to be advanced and @bors/homu doesn't know about it. Which leads to two disadvantages:

I was thinking if there's a way to improve the support for this (and make the flow more known, because I believe it has advantages). I wonder about three different options:

  • The bot could refuse to proceed if a fixup message is present in the branch with an explanation message, handling the second point.
  • The bot could refuse to proceed, but remember the approval. If the rebased branch is pushed and has empty diff against the not squashed, it could remember the approval and proceed then (but I don't know, this may be hard to implement).
  • The bot could actually perform the rebase. But I'm not sure this is desirable (because then it loses eg. gpg signatures on the commit) and there could be conflicts to resolve during the rebase.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions