MCPcopy Index your code
hub / github.com/git/git / apply_item_command

Function apply_item_command

trailer.c:253–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253static void apply_item_command(struct trailer_item *in_tok, struct arg_item *arg_tok)
254{
255 if (arg_tok->conf.command || arg_tok->conf.cmd) {
256 char *value_to_free = NULL;
257 char *arg;
258
259 if (arg_tok->value && arg_tok->value[0]) {
260 arg = arg_tok->value;
261 } else {
262 if (in_tok && in_tok->value)
263 arg = xstrdup(in_tok->value);
264 else
265 arg = xstrdup("");
266 value_to_free = arg_tok->value;
267 }
268
269 arg_tok->value = apply_command(&arg_tok->conf, arg);
270
271 free(value_to_free);
272 free(arg);
273 }
274}
275
276static void apply_arg_if_exists(struct trailer_item *in_tok,
277 struct arg_item *arg_tok,

Callers 2

apply_arg_if_existsFunction · 0.85
apply_arg_if_missingFunction · 0.85

Calls 2

xstrdupFunction · 0.85
apply_commandFunction · 0.85

Tested by

no test coverage detected