builtin/apply: make create_one_file() return -1 on error
commit603752a88df398cbe6cad449b9fbd49aa28dfa20
authorChristian Couder <christian.couder@gmail.com>
Sun, 4 Sep 2016 20:18:19 +0000 (4 22:18 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 7 Sep 2016 19:29:53 +0000 (7 12:29 -0700)
tree7a1b3bd479d4bf224ddb17dc0d5dd539e67a7c90
parent739d8a16b5f1fefc42177c4619605c8cddb3a094
builtin/apply: make create_one_file() return -1 on error

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", create_one_file() should return -1 instead of
calling exit().

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