Subject: Asymmetric default behavior of git stash

From: Uwe Storbeck <[email-masked]>
Date: Tue, 27 Aug 2013 16:07:09 +0200

Hi,

is there any reason why the default behavior of git stash is
asymmetric?

When I save my current state with 'git stash save' it saves the
worktree changes and the index changes (and resets both). When I
restore the state with 'git stash pop' it restores the worktree
changes, but not the state of the index. Your work preparing the
index is lost.

Although this behavior is documented it is kind of unexpected.
>From a save-restore mechanism I would expect that the default
behavior would restore the state as it was before the save. So
I would expect it to either save and restore the worktree and
leave the index alone or save and restore both, the worktree
and the index.

Regards

Uwe