Subject: Re: `git stash pop` UX Problem

From: Omar Othman <[email-masked]>
Date: Tue, 25 Feb 2014 15:12:25 +0100

>> Please note that what I am asking for is not always dropping the
>> stash, but doing that *only* when the merge conflict is resolved. This
>> is simply getting the whole command to be consistent. If you do `git
>> stash pop` and it succeeds, the stash reference is dropped. If you do
>> git stash pop` and it succeeds *after resolving the merge conflict*,
>> the stash reference is *not* dropped. This is *not* consistent and
>> *is* a user experience problem. I'm not asking about dumbing git down
>> by any means.
> Can you describe precisely what you would expect, e.g. what Git's output
> should look like after such and such command?
Sure. This is my current command prompt (which shows git's internal status):

[omar_othman main (trunk*)]$

I do a git stash pop, which causes a merge conflict:

Auto-merging path/to/file.txt
CONFLICT (content): Merge conflict in path/to/file.txt

[omar_othman main (trunk|MERGING*)]$ vi path/to/file.txt
[omar_othman main (trunk|MERGING*)]$ git add path/to/file.txt
[omar_othman main (trunk*)]$

Note how the status message has changed to show that git is now happy. 
It is at that moment that the stash reference should be dropped (or the 
user (somehow) is notified to do that herself if desired), because this 
means that the popping operation has succeeded.