1#!/bin/sh
   2test_description='test cherry-picking a root 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 symbolic-ref HEAD refs/heads/second &&
  15        rm .git/index file1 &&
  16        echo second > file2 &&
  17        git add file2 &&
  18        test_tick &&
  19        git commit -m "second"
  20'
  22test_expect_success 'cherry-pick a root commit' '
  24        git cherry-pick master &&
  26        test first = $(cat file1)
  27'
  29test_done