| test_description='test cherry-picking an empty commit' |
| test_expect_success setup ' |
| git checkout -b empty-branch && |
| git commit --allow-empty -m "empty" && |
| git commit --allow-empty-message -m "" |
| test_expect_success 'cherry-pick an empty commit' ' |
| git cherry-pick empty-branch^ |
| test_expect_success 'index lockfile was removed' ' |
| test ! -f .git/index.lock |
| test_expect_success 'cherry-pick a commit with an empty message' ' |
| git cherry-pick empty-branch |
| test_expect_success 'index lockfile was removed' ' |
| test ! -f .git/index.lock |