Chris Johnsen | 0d66e95 | 2009-03-07 03:30:51 -0600 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | test_description='test cherry-picking an empty commit' |
| 4 | |
| 5 | . ./test-lib.sh |
| 6 | |
| 7 | test_expect_success setup ' |
| 8 | |
| 9 | echo first > file1 && |
| 10 | git add file1 && |
| 11 | test_tick && |
| 12 | git commit -m "first" && |
| 13 | |
| 14 | git checkout -b empty-branch && |
| 15 | test_tick && |
| 16 | git commit --allow-empty -m "empty" |
| 17 | |
| 18 | ' |
| 19 | |
Junio C Hamano | c6720cf | 2009-06-21 02:01:28 -0700 | [diff] [blame] | 20 | test_expect_success 'cherry-pick an empty commit' ' |
| 21 | git checkout master && { |
| 22 | git cherry-pick empty-branch |
| 23 | test "$?" = 1 |
| 24 | } |
Chris Johnsen | 0d66e95 | 2009-03-07 03:30:51 -0600 | [diff] [blame] | 25 | ' |
| 26 | |
| 27 | test_expect_success 'index lockfile was removed' ' |
| 28 | |
| 29 | test ! -f .git/index.lock |
| 30 | |
| 31 | ' |
| 32 | |
| 33 | test_done |