Revision 19376104a8251a7e6c56579cdcd2eb0a106d1fd6 authored by Jeff King on 15 June 2015, 18:27:22 UTC, committed by Junio C Hamano on 15 June 2015, 20:11:17 UTC
This reverts commit ed178ef13a26136d86ff4e33bb7b1afb5033f908. That commit was an attempt to improve the safety of applying a stash, because the application process may create conflicted index entries, after which it is hard to restore the original index state. Unfortunately, this hurts some common workflows around "git stash -k", like: git add -p ;# (1) stage set of proposed changes git stash -k ;# (2) get rid of everything else make test ;# (3) make sure proposal is reasonable git stash apply ;# (4) restore original working tree If you "git commit" between steps (3) and (4), then this just works. However, if these steps are part of a pre-commit hook, you don't have that opportunity (you have to restore the original state regardless of whether the tests passed or failed). It's possible that we could provide better tools for this sort of workflow. In particular, even before ed178ef, it could fail with a conflict if there were conflicting hunks in the working tree and index (since the "stash -k" puts the index version into the working tree, and we then attempt to apply the differences between HEAD and the old working tree on top of that). But the fact remains that people have been using it happily for a while, and the safety provided by ed178ef is simply not that great. Let's revert it for now. In the long run, people can work on improving stash for this sort of workflow, but the safety tradeoff is not worth it in the meantime. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent ed178ef
File | Mode | Size |
---|---|---|
.gitignore | -rw-r--r-- | 7 bytes |
README | -rw-r--r-- | 9.9 KB |
TEAMS | -rw-r--r-- | 1.9 KB |
bg.po | -rw-r--r-- | 423.6 KB |
ca.po | -rw-r--r-- | 312.1 KB |
de.po | -rw-r--r-- | 334.1 KB |
fr.po | -rw-r--r-- | 328.8 KB |
git.pot | -rw-r--r-- | 205.6 KB |
is.po | -rw-r--r-- | 3.1 KB |
it.po | -rw-r--r-- | 128.2 KB |
pt_PT.po | -rw-r--r-- | 99.8 KB |
sv.po | -rw-r--r-- | 318.7 KB |
vi.po | -rw-r--r-- | 356.3 KB |
zh_CN.po | -rw-r--r-- | 309.6 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...