MCPcopy Create free account
hub / github.com/git/git / apply_option_parse_directory

Function apply_option_parse_directory

apply.c:5075–5090  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5073}
5074
5075static int apply_option_parse_directory(const struct option *opt,
5076 const char *arg, int unset)
5077{
5078 struct apply_state *state = opt->value;
5079
5080 BUG_ON_OPT_NEG(unset);
5081
5082 strbuf_reset(&state->root);
5083 strbuf_addstr(&state->root, arg);
5084
5085 if (strbuf_normalize_path(&state->root) < 0)
5086 return error(_("unable to normalize directory: '%s'"), arg);
5087
5088 strbuf_complete(&state->root, '/');
5089 return 0;
5090}
5091
5092int apply_all_patches(struct apply_state *state,
5093 int argc,

Callers

nothing calls this directly

Calls 4

strbuf_addstrFunction · 0.85
strbuf_normalize_pathFunction · 0.85
errorFunction · 0.85
strbuf_completeFunction · 0.85

Tested by

no test coverage detected