Skip to content
Permalink
Browse files

Merge branch 'jk/stash-require-clean-index'

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 24, 2015
2 parents 3072ec3 + 1937610 commit bfb539bb734ee4bc63bf2a6010f935caa78b2b79
Showing with 0 additions and 9 deletions.
  1. +0 −2 git-stash.sh
  2. +0 −7 t/t3903-stash.sh
@@ -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) ||
@@ -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 &&

0 comments on commit bfb539b

Please sign in to comment.
You can’t perform that action at this time.