t / t4115-apply-symlink.shon commit t4000: make hash size independent (8cc5ff8)
   1#!/bin/sh
   2#
   3# Copyright (c) 2005 Junio C Hamano
   4#
   5
   6test_description='git apply symlinks and partial files
   7
   8'
   9
  10. ./test-lib.sh
  11
  12test_expect_success setup '
  13
  14        test_ln_s_add path1/path2/path3/path4/path5 link1 &&
  15        git commit -m initial &&
  16
  17        git branch side &&
  18
  19        rm -f link? &&
  20
  21        test_ln_s_add htap6 link1 &&
  22        git commit -m second &&
  23
  24        git diff-tree -p HEAD^ HEAD >patch  &&
  25        git apply --stat --summary patch
  26
  27'
  28
  29test_expect_success SYMLINKS 'apply symlink patch' '
  30
  31        git checkout side &&
  32        git apply patch &&
  33        git diff-files -p >patched &&
  34        test_cmp patch patched
  35
  36'
  37
  38test_expect_success 'apply --index symlink patch' '
  39
  40        git checkout -f side &&
  41        git apply --index patch &&
  42        git diff-index --cached -p HEAD >patched &&
  43        test_cmp patch patched
  44
  45'
  46
  47test_done