diff options
author | Christian Couder <christian.couder@gmail.com> | 2016-09-04 22:18:18 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-09-07 12:29:53 -0700 |
commit | 739d8a16b5f1fefc42177c4619605c8cddb3a094 (patch) | |
tree | 2ffafc9fba7040559313088d2a5299e6ad520ef5 /builtin/mktree.c | |
parent | builtin/apply: make write_out_results() return -1 on error (diff) | |
download | tgif-739d8a16b5f1fefc42177c4619605c8cddb3a094.tar.xz |
builtin/apply: make try_create_file() 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", try_create_file() should return -1 in case of
error.
Unfortunately try_create_file() currently returns -1 to signal a
recoverable error. To fix that, let's make it return 1 in case of
a recoverable error and -1 in case of an unrecoverable error.
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/mktree.c')
0 files changed, 0 insertions, 0 deletions