diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-02-27 14:01:40 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-02-27 14:01:40 -0800 |
commit | 8336832ad99832d21e5ee588bd3d03369048c05a (patch) | |
tree | 787d8c70b31315c46780323e95c3cc713a961914 /t | |
parent | 795dd116bb655f8aa8c206ecaf415527871cb7a6 (diff) | |
parent | b4b313f94ab06fabe78fa91b3f2ebbc7ef08b012 (diff) | |
download | git-8336832ad99832d21e5ee588bd3d03369048c05a.tar.gz |
Merge branch 'nd/reset-intent-to-add'
* nd/reset-intent-to-add:
reset: support "--mixed --intent-to-add" mode
Diffstat (limited to 't')
-rwxr-xr-x | t/t7102-reset.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh index 8d4b50d1b5..bc0846f435 100755 --- a/t/t7102-reset.sh +++ b/t/t7102-reset.sh @@ -535,4 +535,19 @@ test_expect_success 'reset with paths accepts tree' ' git diff HEAD --exit-code ' +test_expect_success 'reset -N keeps removed files as intent-to-add' ' + echo new-file >new-file && + git add new-file && + git reset -N HEAD && + + tree=$(git write-tree) && + git ls-tree $tree new-file >actual && + >expect && + test_cmp expect actual && + + git diff --name-only >actual && + echo new-file >expect && + test_cmp expect actual +' + test_done |