Asymmetric default behavior of git stash

From: Uwe Storbeck <hidden>
Date: 2016-06-15 22:58:31

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help