From 2f5a6d1218de4dfa326ff289b784d3e293b8141f Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Mon, 8 Aug 2016 23:03:08 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- apply.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apply.h') diff --git a/apply.h b/apply.h index 08c0a252cb..e18a18a964 100644 --- a/apply.h +++ b/apply.h @@ -102,9 +102,9 @@ extern int parse_whitespace_option(struct apply_state *state, extern int parse_ignorewhitespace_option(struct apply_state *state, const char *option); -extern void init_apply_state(struct apply_state *state, - const char *prefix, - struct lock_file *lock_file); +extern int init_apply_state(struct apply_state *state, + const char *prefix, + struct lock_file *lock_file); extern void clear_apply_state(struct apply_state *state); #endif -- cgit v1.2.3