diff options
author | Christian Couder <chriscool@tuxfamily.org> | 2010-01-19 05:25:58 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-01-24 17:46:41 -0800 |
commit | ffbc5dc2d0cbdbd63a4ae04dc2cc1ebf385fcc25 (patch) | |
tree | c73f84fd521a7097a97f3893bbf5c5e89b200691 /t/t7111-reset-table.sh | |
parent | 9bc454df08ca2a27b51ac0ab9ff8f154e51b8698 (diff) | |
download | git-ffbc5dc2d0cbdbd63a4ae04dc2cc1ebf385fcc25.tar.gz |
reset: add test cases for "--keep" option
This shows that with the "--keep" option, changes that are both in
the work tree and the index are kept in the work tree after the
reset (but discarded in the index).
In the case of unmerged entries, we can see that "git reset --keep"
works only when the target state is the same as HEAD. And then the
work tree is not reset.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7111-reset-table.sh')
-rwxr-xr-x | t/t7111-reset-table.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t7111-reset-table.sh b/t/t7111-reset-table.sh index de896c948d..2ebda97828 100755 --- a/t/t7111-reset-table.sh +++ b/t/t7111-reset-table.sh @@ -44,26 +44,32 @@ A B C D soft A B D A B C D mixed A D D A B C D hard D D D A B C D merge XXXXX +A B C D keep XXXXX A B C C soft A B C A B C C mixed A C C A B C C hard C C C A B C C merge XXXXX +A B C C keep A C C B B C D soft B B D B B C D mixed B D D B B C D hard D D D B B C D merge D D D +B B C D keep XXXXX B B C C soft B B C B B C C mixed B C C B B C C hard C C C B B C C merge C C C +B B C C keep B C C B C C D soft B C D B C C D mixed B D D B C C D hard D D D B C C D merge XXXXX +B C C D keep XXXXX B C C C soft B C C B C C C mixed B C C B C C C hard C C C B C C C merge B C C +B C C C keep B C C EOF test_expect_success 'setting up branches to test with unmerged entries' ' @@ -104,10 +110,12 @@ X U B C soft XXXXX X U B C mixed X C C X U B C hard C C C X U B C merge C C C +X U B C keep XXXXX X U B B soft XXXXX X U B B mixed X B B X U B B hard B B B X U B B merge B B B +X U B B keep X B B EOF test_done |