-
Notifications
You must be signed in to change notification settings - Fork 63
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
stg rebase sometimes creates a new patch from an upstream commit #421
Comments
Thanks for this issue report @aczapszys-apex. The workflow you describe seems to match a pretty common workflow that I and others use. I have not seen this kind of issue. Some questions: On your Why do you
How random? The commit message isn't auto-filled from /dev/urandom, right? Does this new bottom most patch share any characteristics, i.e. either the commit message or patch content, with the PR patch? Or is it perhaps related to other commits (i.e. from other people) that landed on Committing the patches posted to the PR also affects what happens when the PR is merged and you run Starting point:
Assuming If a merge commit is created for
Because patch What you perhaps want from the rebase is:
But because
Where I recommend making two adjustments to this workflow:
Let me know if any of this helps get closer to the cause of the issue. |
Thanks for the advice. I wondered if there was something off about my workflow. FYI, our configuration forces all PRs to be squash committed, which is why I'm doling out one patch at a time. |
Why wouldn't |
Having empty patches is normal in StGit and historically removing patches has required an explicit user intent. Thus the existence of So I don't know that there are risks of bad/unrecoverable things happening if I think a config option to auto delete when using |
Option sounds good, although decisions are a lighter maintenance load, maybe. Main UX problem is there's no clear indication cleanup should be performed. |
I haven't been able to produce a test case, but here's what I'm seeing.
When I have this workflow, sometimes I see a new patch created from a commit on origin/main. This is not the most recent commit either.
from branch main
git switch -c topic
stg init
Create a bunch patches...
stg commit
Create a PR from the committed patch, and get it merged into main
git fetch
stg rebase origin/main
stg series
bottom most patch is seemingly random new patch from a commit from origin/main
The text was updated successfully, but these errors were encountered: