1#!/bin/sh
   2test_description='test cherry-picking an empty commit'
   4. ./test-lib.sh
   6test_expect_success setup '
   8        echo first > file1 &&
  10        git add file1 &&
  11        test_tick &&
  12        git commit -m "first" &&
  13        git checkout -b empty-branch &&
  15        test_tick &&
  16        git commit --allow-empty -m "empty"
  17'
  19test_expect_code 1 'cherry-pick an empty commit' '
  21        git checkout master &&
  23        git cherry-pick empty-branch
  24'
  26test_expect_success 'index lockfile was removed' '
  28        test ! -f .git/index.lock
  30'
  32test_done