3 #include "parse-options.h"
6 static const char * const apply_usage
[] = {
7 N_("git apply [<options>] [<patch>...]"),
11 int cmd_apply(int argc
, const char **argv
, const char *prefix
)
16 struct apply_state state
;
18 if (init_apply_state(&state
, the_repository
, prefix
))
21 argc
= apply_parse_options(argc
, argv
,
22 &state
, &force_apply
, &options
,
25 if (check_apply_state(&state
, force_apply
))
28 ret
= apply_all_patches(&state
, argc
, argv
, options
);
30 clear_apply_state(&state
);