apply: --3way with add/add conflict
authorJunio C Hamano <gitster@pobox.com>
Thu, 7 Jun 2012 22:04:11 +0000 (15:04 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Jul 2012 21:40:03 +0000 (14:40 -0700)
When a patch wants to create a path, but we already have it in our
current state, pretend as if the patch and we independently added
the same path and cause add/add conflict, so that the user can
resolve it just like "git merge" in the same situation.

For that purpose, implement load_current() in terms of the
load_patch_target() helper introduced earlier to read the current
contents from the path given by patch->new_name (patch->old_name is
NULL for a creation patch).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found