Skip to content

Commit

Permalink
Merge branch 'jk/stash-require-clean-index' into maint
Browse files Browse the repository at this point in the history
A hotfix for the topic already in 'master'.

* jk/stash-require-clean-index:
  Revert "stash: require a clean index to apply"
  • Loading branch information
gitster committed Jun 26, 2015
2 parents b1f0802 + 1937610 commit 351d06d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
2 changes: 0 additions & 2 deletions git-stash.sh
Expand Up @@ -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) ||
Expand Down
7 changes: 0 additions & 7 deletions t/t3903-stash.sh
Expand Up @@ -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 &&
Expand Down

0 comments on commit 351d06d

Please sign in to comment.