Subject: Re: `git stash pop` UX Problem

From: Junio C Hamano <[email-masked]>
Date: Fri, 28 Feb 2014 09:45:59 -0800

Stephen Leake <[email-masked]> writes:

> Matthieu Moy <[email-masked]> writes:
>
>> [email-masked] (Stefan Haller) writes:
>>
>>> Your intention was clearly to drop the stash, it just wasn't dropped
>>> because of the conflict. Dropping it automatically once the conflict
>>> is resolved would be nice.
>>
>> Your intention when you ran "git stash pop", yes. Your intention when
>> you ran "git add", I call that guessing.
>
> You might be adding other files for other reasons. But if you add a file
> that does resolve a conflict caused by 'git stash pop', it is not
> guessing.

The only thing you know for sure is that the user has consumed _one_
part of the stashed change, no?  What if the stash had changes for
more than one path?

At the time of "git add $path", can you reliably tell if the
conflict to the $path the user is resolving came from a previous
"git stash pop", not from any other mergy operations, e.g. "git
stash apply" or "git apply -3"?