apply: make init_apply_state() return -1 instead of exit()ing
commit2f5a6d1218de4dfa326ff289b784d3e293b8141f
authorChristian Couder <christian.couder@gmail.com>
Mon, 8 Aug 2016 21:03:08 +0000 (8 23:03 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Aug 2016 19:41:47 +0000 (11 12:41 -0700)
tree2c77afed2a36432dd3ac9b9b3b9714cfc4024382
parentbb493a5c147a4b60f0f412a71bf9236ede4a560c
apply: make init_apply_state() return -1 instead of exit()ing

To libify `git apply` functionality we have to signal errors to the
caller instead of exit()ing.

To do that in a compatible manner with the rest of the error handling
in "builtin/apply.c", init_apply_state() should return -1 instead of
calling exit().

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
apply.c
apply.h
builtin/apply.c