Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Couder <christian.couder@gmail.com>2016-08-09 00:03:08 +0300
committerJunio C Hamano <gitster@pobox.com>2016-08-11 22:41:47 +0300
commit2f5a6d1218de4dfa326ff289b784d3e293b8141f (patch)
tree2c77afed2a36432dd3ac9b9b3b9714cfc4024382 /apply.h
parentbb493a5c147a4b60f0f412a71bf9236ede4a560c (diff)
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 <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'apply.h')
-rw-r--r--apply.h6
1 files changed, 3 insertions, 3 deletions
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