Re: Feature: git stash pop --always-drop

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

 



Junio C Hamano <gitster <at> pobox.com> writes:
 
>>Yes, my use case is that I get confused about whether the stash has been
>>dropped or not and whether I might have stashed something else in the
>>meantime.  So for me plain 'git stash drop' feels a bit dangerous.
>
>Then "git stash apply" followed by "git stash drop" would be a pair
>of good workflow elements for you, no?

I like ordinary 'git stash pop' when it applies cleanly.  Only in the cases
where it has conflicts and leaves the stash in place does it get a bit
awkward.  I manually resolve the conflicts and then 'git stash drop', but
that last step is a bit dangerous because it might drop an unrelated stash
if I have done some other stashing in the meantime.

If 'git stash pop' (and 'apply') would always print the name of the stash,
then it would be easy to drop that particular stash afterwards.  Running
one too many or one too few 'git stash drop' commands would no longer cause
problems.

Printing the name of the stash would, for me, largely remove the need for
an --always-drop option to git stash, which is what I at first suggested.

-- 
Ed Avis <eda@xxxxxxxxxxxxx>

--
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]