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