Merge branch 'jk/stash-require-clean-index'
authorJunio C Hamano <gitster@pobox.com>
Wed, 24 Jun 2015 19:21:59 +0000 (12:21 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Jun 2015 19:21:59 +0000 (12:21 -0700)
A hotfix for the topic already in 'master'.

* jk/stash-require-clean-index:
Revert "stash: require a clean index to apply"

git-stash.sh
t/t3903-stash.sh
index 1f5ea877d719715760d42a3ee1d0950a1adaf9fc..8e9e2cd7d5697c1f2b7ccb8753d384d9f4461bef 100755 (executable)
@@ -457,8 +457,6 @@ apply_stash () {
        assert_stash_like "$@"
 
        git update-index -q --refresh || die "$(gettext "unable to refresh index")"
-       git diff-index --cached --quiet --ignore-submodules HEAD -- ||
-               die "$(gettext "Cannot apply stash: Your index contains uncommitted changes.")"
 
        # current index state
        c_tree=$(git write-tree) ||
index 7396ca991132a88012955a281a71c330eab2092b..f5f18b7d21c00da258125a9125a46b32cf9e8504 100755 (executable)
@@ -45,13 +45,6 @@ test_expect_success 'applying bogus stash does nothing' '
        test_cmp expect file
 '
 
-test_expect_success 'apply requires a clean index' '
-       test_when_finished "git reset --hard" &&
-       echo changed >other-file &&
-       git add other-file &&
-       test_must_fail git stash apply
-'
-
 test_expect_success 'apply does not need clean working directory' '
        echo 4 >other-file &&
        git stash apply &&