git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
EAEd Avis <eda@waniasset.com>
Date
Aug 10, 2015, 15:16 UTC
Message-ID
<loom.20150810T171010-455@post.gmane.org>
In-Reply-To
<xmqqzj1zuqod.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster <at> pobox.com> writes:
 
Show 6 quoted lines
>>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@waniasset.com>
Previous: Junio C Hamano
Message 9 of 9 in “Feature: git stash pop --always-drop”
  1. Ed AvisAug 10, 2015
  2. Jeff KingAug 10, 2015
  3. Ed AvisAug 10, 2015
  4. Jeff KingAug 10, 2015
  5. Ed AvisAug 10, 2015
  6. Jeff KingAug 10, 2015
  7. Ed AvisAug 10, 2015
  8. Junio C HamanoAug 10, 2015
  9. Ed AvisAug 10, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.