Fix git-apply with -p greater than 1
commitcefd43b7f9b86b1c5de5216a8a03fac5e611afa9
authorFederico Cuello <fedux@lugmen.org.ar>
Thu, 21 Oct 2010 22:12:02 +0000 (21 19:12 -0300)
committerJunio C Hamano <gitster@pobox.com>
Fri, 5 Nov 2010 21:23:55 +0000 (5 14:23 -0700)
tree4a7529087a4b7f19bb40eaa0cfa124366fa2fd30
parent8a90438506d3b7c8ef8bd802b7ed10c1f12da1d0
Fix git-apply with -p greater than 1

Fix the case when the patch is a rename or mode-change only
and -p is used with a value greater than one.
The git_header_name function did not remove more than one path
component.

Signed-off-by: Federico Cuello <fedux@lugmen.org.ar>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/apply.c