]> git.ipfire.org Git - thirdparty/git.git/blame - t/t4115-apply-symlink.sh
Git 1.7.3.4
[thirdparty/git.git] / t / t4115-apply-symlink.sh
CommitLineData
2c71810b
JH
1#!/bin/sh
2#
3# Copyright (c) 2005 Junio C Hamano
4#
5
5be60078 6test_description='git apply symlinks and partial files
2c71810b
JH
7
8'
9
10. ./test-lib.sh
11
41be8ea2 12test_expect_success SYMLINKS setup '
2c71810b
JH
13
14 ln -s path1/path2/path3/path4/path5 link1 &&
15 git add link? &&
16 git commit -m initial &&
17
18 git branch side &&
19
20 rm -f link? &&
21
22 ln -s htap6 link1 &&
23 git update-index link? &&
24 git commit -m second &&
25
26 git diff-tree -p HEAD^ HEAD >patch &&
27 git apply --stat --summary patch
28
29'
30
41be8ea2 31test_expect_success SYMLINKS 'apply symlink patch' '
2c71810b
JH
32
33 git checkout side &&
34 git apply patch &&
35 git diff-files -p >patched &&
3af82863 36 test_cmp patch patched
2c71810b
JH
37
38'
39
41be8ea2 40test_expect_success SYMLINKS 'apply --index symlink patch' '
2c71810b
JH
41
42 git checkout -f side &&
43 git apply --index patch &&
44 git diff-index --cached -p HEAD >patched &&
3af82863 45 test_cmp patch patched
2c71810b
JH
46
47'
48
49test_done