1#!/bin/sh
2#
3# Copyright (c) 2007 Shawn O. Pearce
4#
56
test_description='git apply -p handling.'
78
. ./test-lib.sh
910
test_expect_success setup '
11mkdir sub &&
12echo A >sub/file1 &&
13cp sub/file1 file1 &&
14git add sub/file1 &&
15echo B >sub/file1 &&
16git diff >patch.file &&
17rm sub/file1 &&
18rmdir sub
19'
2021
test_expect_success 'apply git diff with -p2' '
22git apply -p2 patch.file
23'
2425
test_done