mirror of
https://github.com/git/git
synced 2024-10-28 19:25:47 +00:00
bc5c5ec044
Since this header showed up in some places besides just #include statements, update/clean-up/remove those other places as well. Note that compat/fsmonitor/fsm-path-utils-darwin.c previously got away with violating the rule that all files must start with an include of git-compat-util.h (or a short-list of alternate headers that happen to include it first). This change exposed the violation and caused it to stop building correctly; fix it by having it include git-compat-util.h first, as per policy. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
34 lines
682 B
C
34 lines
682 B
C
#include "builtin.h"
|
|
#include "gettext.h"
|
|
#include "parse-options.h"
|
|
#include "repository.h"
|
|
#include "apply.h"
|
|
|
|
static const char * const apply_usage[] = {
|
|
N_("git apply [<options>] [<patch>...]"),
|
|
NULL
|
|
};
|
|
|
|
int cmd_apply(int argc, const char **argv, const char *prefix)
|
|
{
|
|
int force_apply = 0;
|
|
int options = 0;
|
|
int ret;
|
|
struct apply_state state;
|
|
|
|
if (init_apply_state(&state, the_repository, prefix))
|
|
exit(128);
|
|
|
|
argc = apply_parse_options(argc, argv,
|
|
&state, &force_apply, &options,
|
|
apply_usage);
|
|
|
|
if (check_apply_state(&state, force_apply))
|
|
exit(128);
|
|
|
|
ret = apply_all_patches(&state, argc, argv, options);
|
|
|
|
clear_apply_state(&state);
|
|
|
|
return ret;
|
|
}
|