apply: refactor "previous patch" logic
commitccf998b297c6d04053eaa9d61e9cb4187bccd0a9
authorJunio C Hamano <gitster@pobox.com>
Wed, 16 May 2012 21:03:52 +0000 (16 14:03 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Jul 2012 21:36:50 +0000 (9 14:36 -0700)
tree79f45bde13d5b2c06282e7f1328cb5fc13fd23e6
parent37b9c903eb825ca741ea0eddc942309f892b682f
apply: refactor "previous patch" logic

The code to grab the result of application of a previous patch in the
input was mixed with error message generation for a case where a later
patch tries to modify contents of a path that has been removed.

The same code is duplicated elsewhere in the code.  Introduce a helper
to clarify what is going on.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/apply.c