t / t6039-merge-ignorecase.shon commit Merge branch 'jk/delete-modechange-conflict' (203501b)
   1#!/bin/sh
   2
   3test_description='git-merge with case-changing rename on case-insensitive file system'
   4
   5. ./test-lib.sh
   6
   7if ! test_have_prereq CASE_INSENSITIVE_FS
   8then
   9        skip_all='skipping case insensitive tests - case sensitive file system'
  10        test_done
  11fi
  12
  13test_expect_success 'merge with case-changing rename' '
  14        test $(git config core.ignorecase) = true &&
  15        >TestCase &&
  16        git add TestCase &&
  17        git commit -m "add TestCase" &&
  18        git tag baseline &&
  19        git checkout -b with-camel &&
  20        >foo &&
  21        git add foo &&
  22        git commit -m "intervening commit" &&
  23        git checkout master &&
  24        git rm TestCase &&
  25        >testcase &&
  26        git add testcase &&
  27        git commit -m "rename to testcase" &&
  28        git checkout with-camel &&
  29        git merge master -m "merge" &&
  30        test_path_is_file testcase
  31'
  32
  33test_expect_success 'merge with case-changing rename on both sides' '
  34        git checkout master &&
  35        git reset --hard baseline &&
  36        git branch -D with-camel &&
  37        git checkout -b with-camel &&
  38        git mv TestCase testcase &&
  39        git commit -m "recase on branch" &&
  40        >foo &&
  41        git add foo &&
  42        git commit -m "intervening commit" &&
  43        git checkout master &&
  44        git rm TestCase &&
  45        >testcase &&
  46        git add testcase &&
  47        git commit -m "rename to testcase" &&
  48        git checkout with-camel &&
  49        git merge master -m "merge" &&
  50        test_path_is_file testcase
  51'
  52
  53test_done