git-ps icon indicating copy to clipboard operation
git-ps copied to clipboard

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

Open drewdeponte opened this issue 4 years ago • 5 comments

drewdeponte avatar Sep 09 '21 23:09 drewdeponte

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

drewdeponte avatar Jan 11 '22 05:01 drewdeponte

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

  • stash
  • cancel

Maybe a third/fourth option like:

  • append changes to last commit
  • append changes to requested commit at index: [index]

ctsstc avatar Jan 12 '22 02:01 ctsstc

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.

brandonpittman avatar Jan 12 '22 02:01 brandonpittman

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.

drewdeponte avatar Jan 12 '22 13:01 drewdeponte

-s seems good to me!

brandonpittman avatar Jan 12 '22 14:01 brandonpittman