diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-10-07 11:32:53 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-07 11:32:53 +0900 |
commit | ba2d45112224a0bd5ba0f10ba180c88d148cec36 (patch) | |
tree | c4824e0fa57f40c49904807f9913aa4c2160b6bb /t/t3903-stash.sh | |
parent | c90b652afd68364640009a52fa6bf6f5fd245186 (diff) | |
parent | 34933d0eff5d4c91fae6ad6f71a6e6a69a496ced (diff) | |
download | git-ba2d45112224a0bd5ba0f10ba180c88d148cec36.tar.gz |
Merge branch 'tg/stash-refresh-index'
"git stash" learned to write refreshed index back to disk.
* tg/stash-refresh-index:
stash: make sure to write refreshed cache
merge: use refresh_and_write_cache
factor out refresh_and_write_cache function
Diffstat (limited to 't/t3903-stash.sh')
-rwxr-xr-x | t/t3903-stash.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index 820b350aeb..580bfbdc23 100755 --- a/t/t3903-stash.sh +++ b/t/t3903-stash.sh @@ -1253,4 +1253,20 @@ test_expect_success 'stash --keep-index with file deleted in index does not resu test_path_is_missing to-remove ' +test_expect_success 'stash apply should succeed with unmodified file' ' + echo base >file && + git add file && + git commit -m base && + + # now stash a modification + echo modified >file && + git stash && + + # make the file stat dirty + cp file other && + mv other file && + + git stash apply +' + test_done |