builtin/apply: make create_file() return -1 on error
commit8f5b5445d7c015dc5f2bbf65d23779d355c0c36e
authorChristian Couder <christian.couder@gmail.com>
Mon, 8 Aug 2016 21:03:20 +0000 (8 23:03 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Aug 2016 19:41:47 +0000 (11 12:41 -0700)
tree686900c4155ebe34050c8303cf488b396a297fde
parent69e1609f812d5accc1b54f737faba354f5bd85db
builtin/apply: make create_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_file() should just return what
add_conflicted_stages_file() and add_index_file() are returning
instead of calling exit().

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