Re: [PATCH] Showing stash state in bash prompt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 15, 2009 at 09:57:20AM +0900, Miles Bader wrote:

> Thomas Rast <trast@xxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]