Junio C Hamano | 49d833d | 2009-05-12 09:41:28 -0700 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | test_description='Peter MacMillan' |
| 4 | . ./test-lib.sh |
| 5 | |
| 6 | test_expect_success setup ' |
| 7 | echo Hello >file && |
| 8 | git add file && |
| 9 | test_tick && |
| 10 | git commit -m V1 && |
| 11 | echo Hello world >file && |
| 12 | git add file && |
| 13 | git checkout -b other |
| 14 | ' |
| 15 | |
| 16 | test_expect_success 'check all changes are staged' ' |
| 17 | git diff --exit-code |
| 18 | ' |
| 19 | |
| 20 | test_expect_success 'second commit' ' |
| 21 | git commit -m V2 |
| 22 | ' |
| 23 | |
| 24 | test_expect_success 'check' ' |
| 25 | git diff --cached --exit-code |
| 26 | ' |
| 27 | |
| 28 | test_done |