提交 13b5af22 编写于 作者: C Christian Couder 提交者: Junio C Hamano

apply: move libified code from builtin/apply.c to apply.{c,h}

As most of the apply code in builtin/apply.c has been libified by a number of
previous commits, it can now be moved to apply.{c,h}, so that more code can
use it.
Helped-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Helped-by: NRamsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: NChristian Couder <chriscool@tuxfamily.org>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 803bf4e0
此差异已折叠。
......@@ -102,6 +102,20 @@ extern int parse_whitespace_option(struct apply_state *state,
extern int parse_ignorewhitespace_option(struct apply_state *state,
const char *option);
extern int apply_option_parse_exclude(const struct option *opt,
const char *arg, int unset);
extern int apply_option_parse_include(const struct option *opt,
const char *arg, int unset);
extern int apply_option_parse_p(const struct option *opt,
const char *arg,
int unset);
extern int apply_option_parse_whitespace(const struct option *opt,
const char *arg, int unset);
extern int apply_option_parse_directory(const struct option *opt,
const char *arg, int unset);
extern int apply_option_parse_space_change(const struct option *opt,
const char *arg, int unset);
extern int init_apply_state(struct apply_state *state,
const char *prefix,
struct lock_file *lock_file);
......@@ -115,4 +129,9 @@ extern int check_apply_state(struct apply_state *state, int force_apply);
#define APPLY_OPT_INACCURATE_EOF (1<<0) /* accept inaccurate eof */
#define APPLY_OPT_RECOUNT (1<<1) /* accept inaccurate line count */
extern int apply_all_patches(struct apply_state *state,
int argc,
const char **argv,
int options);
#endif
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册