Skip to content

Commit bfb539b

Browse files
committed
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"
2 parents 3072ec3 + 1937610 commit bfb539b

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

git-stash.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,6 @@ apply_stash () {
457457
assert_stash_like "$@"
458458

459459
git update-index -q --refresh || die "$(gettext "unable to refresh index")"
460-
git diff-index --cached --quiet --ignore-submodules HEAD -- ||
461-
die "$(gettext "Cannot apply stash: Your index contains uncommitted changes.")"
462460

463461
# current index state
464462
c_tree=$(git write-tree) ||

t/t3903-stash.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,6 @@ test_expect_success 'applying bogus stash does nothing' '
4545
test_cmp expect file
4646
'
4747

48-
test_expect_success 'apply requires a clean index' '
49-
test_when_finished "git reset --hard" &&
50-
echo changed >other-file &&
51-
git add other-file &&
52-
test_must_fail git stash apply
53-
'
54-
5548
test_expect_success 'apply does not need clean working directory' '
5649
echo 4 >other-file &&
5750
git stash apply &&

0 commit comments

Comments
 (0)