Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rebase: do not try to fixup a skipped commit #1321

Open
dscho opened this issue Aug 12, 2022 · 9 comments
Open

rebase: do not try to fixup a skipped commit #1321

dscho opened this issue Aug 12, 2022 · 9 comments

Comments

@dscho
Copy link
Member

dscho commented Aug 12, 2022

When running an interactive rebase, it is possible that the target commit of a fixup! commit could not be applied due to merge conflicts (or because it has been upstreamed). In this instance, going forward with a fixup will amend the wrong commit.

Let's prevent that.

The specifics how to prevent that are not set in stone. The easiest solution would probably be to refuse to even start with the fixup command, to complain loudly, and to re-issue the command for the user to edit.

The tricky part will be to detect that situation because the target commit might have failed to apply cleanly, requiring manual fixing up followed by git add -u && git rebase --continue, but those manual fixups might have resulted in no more changes to be committed, either.

@dscho
Copy link
Member Author

dscho commented Aug 12, 2022

See git-for-windows#3981 (comment) for a real-world scenario where this bug caused real problems.

@derrickstolee
Copy link

By "refusing to start the fixup!" do you instead mean to keep the commit as a pick and not reorder it?

@dscho
Copy link
Member Author

dscho commented Aug 14, 2022

No, at the time we could reorder it, we won't have the information whether its target pick caused problems and was skipped by the user.

@samkergachu
Copy link

Hey dscho. Is anyone working on this, I would like to take it up as my outreachy microproject

@dscho
Copy link
Member Author

dscho commented Nov 3, 2022

@samkergachu I am unaware of anybody else working on this, so go right ahead!

@vinayakdsci
Copy link

Hey @dscho! Could you help me take up this issue as my GSoC microproject?
I would be very grateful.

@dscho
Copy link
Member Author

dscho commented Feb 7, 2023

Hey @dscho! Could you help me take up this issue as my GSoC microproject? I would be very grateful.

Unfortunately, I am pressed for time. You could reach out to the Git mailing list for guidance, though. You can maximize your chances by being specific about your needs.

@vinayakdsci
Copy link

Absolutely, I can understand. I will ask on the mailing list. Thanks!

@vinayakdsci
Copy link

vinayakdsci commented Feb 8, 2023 via email

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

No branches or pull requests

4 participants