Merge branch 'jc/apply-binary-p0' into maint-1.7.11
authorJunio C Hamano <gitster@pobox.com>
Wed, 12 Sep 2012 21:00:52 +0000 (14:00 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Sep 2012 21:00:53 +0000 (14:00 -0700)
commit1403db49b80630cf8c36ba3e8b0f085ea0ab8286
treedc7e01049a14a36188e1837d2b3ed002dc88402f
parenteaff724bbc9c8f838b6d65fff9959da968939c3a
parent6a2abdc12516cd3801bceef4ccfba399c962a074
Merge branch 'jc/apply-binary-p0' into maint-1.7.11

"git apply -p0" did not parse pathnames on "diff --git" line
correctly.  This caused patches that had pathnames in no other
places to be mistakenly rejected (most notably, binary patch that
does not rename nor change mode).  Textual patches, renames or mode
changes have preimage and postimage pathnames in different places in
a form that can be parsed unambiguously and did not suffer from this
problem.

* jc/apply-binary-p0:
  apply: compute patch->def_name correctly under -p0
builtin/apply.c
t/t4103-apply-binary.sh