Git Product home page Git Product logo

Comments (2)

sven-of-cord avatar sven-of-cord commented on July 17, 2024

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.

fredrikaverpil avatar fredrikaverpil commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.