t / t6033-merge-crlf.shon commit merge-recursive: D/F conflicts where was_a_dir/file -> was_a_dir (86273e5)
   1#!/bin/sh
   2
   3test_description='merge conflict in crlf repo
   4
   5                b---M
   6               /   /
   7        initial---a
   8
   9'
  10
  11. ./test-lib.sh
  12
  13test_expect_success setup '
  14        git config core.autocrlf true &&
  15        echo foo | append_cr >file &&
  16        git add file &&
  17        git commit -m "Initial" &&
  18        git tag initial &&
  19        git branch side &&
  20        echo line from a | append_cr >file &&
  21        git commit -m "add line from a" file &&
  22        git tag a &&
  23        git checkout side &&
  24        echo line from b | append_cr >file &&
  25        git commit -m "add line from b" file &&
  26        git tag b &&
  27        git checkout master
  28'
  29
  30test_expect_success 'Check "ours" is CRLF' '
  31        git reset --hard initial &&
  32        git merge side -s ours &&
  33        cat file | remove_cr | append_cr >file.temp &&
  34        test_cmp file file.temp
  35'
  36
  37test_expect_success 'Check that conflict file is CRLF' '
  38        git reset --hard a &&
  39        test_must_fail git merge side &&
  40        cat file | remove_cr | append_cr >file.temp &&
  41        test_cmp file file.temp
  42'
  43
  44test_done