Comments (2)
Hi @fredrikaverpil !
This is expected behaviour. When you update an existing PR by calling spr diff
on it again, it will ask you for an update message. Something that describes to your reviewers what changes/fixes/improvements you have made in this update. This makes for a nice timeline on GitHub, where you can see people commenting on your code, e.g. "you have a typo here", followed up by an update of your code titled "fix typo", etc. etc.
When your PR is ready to merge, you can use spr land
to do that, and it will squash-merge your PR onto the main branch, so it becomes all a single commit again (exactly the commit you had locally), and that will automatically have the proper commit message.
The assumption here is that as the author of a PR, you will be the one who merges it, not somebody else. So it's okay if you're the only spr user in your team, nobody else has to use it. But the sad truth is that GitHub displays a merge button, and it doesn't produce the commit message we want, so you have to resist using that and use spr land
instead. (Or you copy and paste the right message into the text field manually every time - but who wants to do that?)
The added benefit of using spr land
for landing is that it will also complain if you made changes locally that you forgot to upload. spr land
only does the merge if the PR is still in sync with your local commit, for peace of mind. If it isn't, it will tell you to do another spr diff
first - after which you can see on GitHub what additional changes there were. (If you're interested in technical detail: spr land
checks if cherry-picking your local commit onto master produces the same result as merging the PR in its current state - only if it does, it proceeds with the API request to GitHub to squash-merge the PR.)
from spr.
Ok, thanks for the explanation @sven-of-cord 👍
I appreciate the hard work done on spr but I ended up having graphite.dev fit my needs better, so I'm using that instead.
from spr.
Related Issues (20)
- Multiple stacks of work? HOT 1
- [question] Any way to support squash merging PR in GitHub UI and then update locally?
- [feature request] Show stack in PR
- [Critical Bug] Error when updating an existing PR HOT 4
- spr list (and land) PR statuses are always PENDING HOT 1
- Formula Name Conflict Between Two Projects
- Maintenance status HOT 1
- spr diff uses jujutsu to amend? HOT 4
- Changing Base Branche Dismisses the Reviewers' Approval
- `an unknown git error occurred; code=NotFound (-3)` HOT 1
- Please update the ring crate to 17.x
- Support specification of branch name in `spr diff` HOT 1
- Remove "Reviewers:" for `spr land` HOT 2
- Support for Bitbucket and others?
- invalid data in index - calculated checksum does not match expected; class=Index (10) HOT 1
- Use spr and bors together
- Spr doesn't recognize existing commits/PRs
- feat(cli): support `githubMasterBranch` from CLI
- [docs] Need clarification on how to insert a commit into the middle of an ongoing stacked PR review
- Documentation Webpage returning 404 from Github Pages HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spr.