Skip to content

Conversation

@mricherzhagen
Copy link
Contributor

@mricherzhagen mricherzhagen commented Jan 12, 2026

PR Description

Sometimes I run into the "Multiple base commits found" error message, when I'm using the ctrl-f function to find the commit to fixup. But most often than not it lists the base commit I want and a bunch of unsquashed fixup! commits.

This PR makes lazygit check for that case and then offers the only non-fixup commit found with a warning/confirmation dialog.

This PR shares a commit with #5193 that moves the creation of the Handler function into a helper function.

Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

@mricherzhagen mricherzhagen force-pushed the fixup_helper_ignore_fixup_commits branch from aabcf41 to 9ba5b1f Compare January 12, 2026 15:00
@mricherzhagen mricherzhagen changed the title Make Fixup Helper ignore fixup-commits, if multiple base commits are found. feat: Make Fixup Helper ignore fixup-commits, if multiple base commits are found. Jan 12, 2026
@mricherzhagen mricherzhagen force-pushed the fixup_helper_ignore_fixup_commits branch from 9ba5b1f to 7f95ff7 Compare January 12, 2026 15:24
@stefanhaller
Copy link
Collaborator

This is a very welcome change; I frequently run into this situation too, and find it annoying.

However, the implementation is not quite good enough: you are only looking for any fixup! commits, but it's important that you only consider fixup commits for the same base commit. (This needs a prefix comparison, since the subject of the fixup might be shorter than the original.)

Also, once you detected this situation, I think we should select the base commit without showing a confirmation. I find the confirmation more confusing than helpful actually.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants