Revision 53b3c47d64b4294ae586d1daa04f9140dadd9ae6 authored by Michael J Gruber on 15 April 2010, 09:34:07 UTC, committed by Junio C Hamano on 17 April 2010, 17:30:00 UTC
The last two tests here were always supposed to fail in the sense
that, according to code and documentation, mktree should read non-recursive
ls-tree output, but not recursive one, and therefore explicitely refuses
to deal with slashes.

Adjust the test (must_fail) so that it succeeds when mktree dies on
slashes.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 2179870
Raw File
t4120-apply-popt.sh
#!/bin/sh
#
# Copyright (c) 2007 Shawn O. Pearce
#

test_description='git apply -p handling.'

. ./test-lib.sh

test_expect_success setup '
	mkdir sub &&
	echo A >sub/file1 &&
	cp sub/file1 file1 &&
	git add sub/file1 &&
	echo B >sub/file1 &&
	git diff >patch.file &&
	rm sub/file1 &&
	rmdir sub
'

test_expect_success 'apply git diff with -p2' '
	git apply -p2 patch.file
'

test_expect_success 'apply with too large -p' '
	test_must_fail git apply --stat -p3 patch.file 2>err &&
	grep "removing 3 leading" err
'

test_done
back to top