From: Jeff King Date: Fri, 15 May 2009 02:11:05 GMT Subject: Re: [PATCH] Showing stash state in bash prompt Message-ID: <20090515021105.GA19241@coredump.intra.peff.net> In-Reply-To: On Fri, May 15, 2009 at 09:57:20AM +0900, Miles Bader wrote: > Thomas Rast writes: > > But IMHO it would not be a good idea to teach people stash/pop anyway: > > 'stash drop' is irreversible, because the stash is itself implemented > > through the reflog and thus not guarded by one. > > I don't understand why you say this -- sure "drop" is dangerous, but > that's exactly why you should use "pop" instead, because it makes sure > the changes are _somewhere_. I found with the old (pre-"pop") stash, > I'd often end up in a situation where I'd lose track of whether I had > done a stash apply or not, and the risk of inadvertently doing a drop > _without_ a corresponding apply was very real. "pop" doesn't always succeed. If you have conflicts in applying, then you end up with conflict markers, and the stash remains. You then fix up and commit as you see fit, but your stash is still there. So this bash prompt will nag you, which I think is what Thomas was complaining about (but perhaps the nagging would then convince you to keep a cleaner stash area by dropping the resolved stash). -Peff