spacedentist / spr

Submit pull requests for individual, amendable, rebaseable commits to GitHub
https://getcord.github.io/spr/
MIT License
377 stars 33 forks source link

Needing to always pass `--cherry-pick` is unexpected #127

Open joneshf opened 1 year ago

joneshf commented 1 year ago

Ran into some confusing behavior just a bit ago. I opened a PR with spr diff --cherry-pick. I wanted to reword the commit message and update the PR with that new message, so I did git commit --amend followed by spr diff. Since I didn't use the --cherry-pick option the second time, it changed the base and pushed a synthetic branch like it normally does for a stacked PR. I understand why it did that, but it's just not what I expected. I'm not sure what the suggestion is from me.

Maybe the documentation should mention that once you use --cherry-pick for spr diff, you have to use --cherry-pick for every command on that commit? That's how spr land works, so it kind of makes sense.

I think it would be nice if you didn't have to remember to always pass the --cherry-pick option after the initial spr diff. If the motivation behind that is to be explicit with the commands, I can understand that. But I can imagine I wouldn't be the only person to either not know, or forget to pass the --cherry-pick option.

Any thoughts on this situation?

sven-of-cord commented 1 year ago

I am collecting ideas for a version 2.0 or something, and I am really tempted to use Git trailers to store a bit more meta information. So spr could remember a previous use of --cherry-pick on a specific commit. And maybe we add a --no-cherry-pick option for when you want to override that.

rockwotj commented 1 year ago

I would be a fan of a trailer for this!

rockwotj commented 1 year ago

Another option outside of adding a trailer for this would be to add a note in git-notes for this: https://git-scm.com/docs/git-notes