builtin/apply: make build_fake_ancestor() return -1 on error
commitfe41b8022560e24c1617cc8b3bd11b72bd1ff4bd
authorChristian Couder <christian.couder@gmail.com>
Mon, 8 Aug 2016 21:03:16 +0000 (8 23:03 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Aug 2016 19:41:47 +0000 (11 12:41 -0700)
tree949f5509c59f30bb72324f2fae1286840ed3d0fa
parent119ab159e65b229feb3851334441ca24aab131ba
builtin/apply: make build_fake_ancestor() return -1 on error

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

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

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