drewdeponte / git-ps

Patch Stack workflow CLI extension for Git
MIT License
50 stars 4 forks source link

auto stash uncommited changes when doing rr and auto pop stashed changes when done with rr #39

Open drewdeponte opened 3 years ago

drewdeponte commented 2 years ago

Thinking about this some more this should be an optional switch to control this.

ctsstc commented 2 years ago

If there are changes maybe present a prompt asking if should:

Maybe a third/fourth option like:

brandonpittman commented 2 years ago

I'd be happy to just have the rr work as normal and then pop the unstaged files back in. The issue I always run into is that I'll want to rr some commits, but I did some work before I requested the review. It's never that I want to append the current working files onto existing commits.

drewdeponte commented 2 years ago

Yeah I am in the camp with @brandonpittman i think we just need a switch we can provide on the command line to control if it auto stashes and pops or not.

Maybe something like

git-ps rr -s <patch-index>

Short for stash, or maybe

git-ps rr -a <patch-index>

Short for auto-stash.

Then if people prefer one behavior over the other they can control it with aliases.

brandonpittman commented 2 years ago

-s seems good to me!