Code

stash drops the stash even if creating the branch fails because it already exists
authorTomas Carnecky <tom@dbservice.com>
Tue, 28 Sep 2010 13:19:51 +0000 (23:19 +1000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 29 Sep 2010 16:59:42 +0000 (09:59 -0700)
commit835d6a1f9f6f0f6e47cf32238af7ee8b8d048d78
treedd3d741a4bc4cceff0ed0ef9aa15b18ad2bd383c
parent442cb08fa0dca38c99cf1ff8a5654a95a5cad7a4
stash drops the stash even if creating the branch fails because it already exists

This bug was disovered by someone on IRC when he tried to

    $ git stash branch <branch> <stash>

while <branch> already existed. In that case the stash is dropped even
though it isn't applied on any branch, so the stash is effectively lost.

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3903-stash.sh