mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
bb493a5c14
commit
2f5a6d1218
6
apply.h
6
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
|
||||
|
||||
Reference in New Issue
Block a user