ejoffe / spr

Stacked Pull Requests on GitHub
MIT License
796 stars 68 forks source link

Bug? `git amend` leaves `fixup!` commit #222

Closed yogurtearl closed 2 years ago

yogurtearl commented 2 years ago

When using git amend it seems to be leaving a fixup! commit even after the git rebase -i --autosquash --autostash is successful.

I have to do git rebase -i --autosquash main after git amend to get it to squash in the fixup commit. It seems to need the main branch in the rebase command.

git: 2.35.1 spr: 0.8.3

ejoffe commented 2 years ago

I guess this is the beginning of the troubles you had and potentially causing #224. Just to make sure, the issue here is that the rebase command is missing the upstream? git rebase -i --autosquash --autostash origin/main

yogurtearl commented 2 years ago

Just to make sure, the issue here is that the rebase command is missing the upstream?

yup. it just does git rebase -i --autosquash --autostash (missing the origin/main), which fails to squash the fixups.

my .spr.yml in the repo has:

githubRemote: origin
githubBranch: main
jameskyle commented 2 years ago

Seeing this too.

my .spr.yml is

githubRemote: origin
githubBranch: develop

the autosquash is missing the target branch origin/develop when I run it manually, it works as expected and spr closes the "dangling" fixup commit PR.