Re: [PATCH 3/3] stash: require a clean index to apply
- From
bär <crashcookie@gmail.com>
- Date
- Jun 10, 2015, 18:19 UTC
- Message-ID
- <CADQvvWWpjZoXt7=8yAEt110pBTNtBfg7XfPOTbJRfPUH=J3OKw@mail.gmail.com>
- In-Reply-To
- <20150607124001.GA11042@peff.net>
On Sun, Jun 7, 2015 at 9:40 AM, Jeff King <peff@peff.net> wrote:
> Hrm. The new protection in v2.4.2 is meant to prevent you from losing > your index state during step 4 when we run into a conflict. But here you > know something that git doesn't: that we just created the stash based on > this same state, so it should apply cleanly.
It is strange that `git stash --keep-index && git stash pop` while having something in the index, fails with a "Cannot apply stash: Your index contains uncommitted changes." error, even if we have a `--force` param it find it awkward that one needs to force applying/pop'ing even though the stash was created from the same snapshot where the stash is being merged with.
I understand the original issue, but at least it was expected, when you stash save/pop/apply, you should know what you are doing anyways.
-- Ber Clausen