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

Function diff_opt_output

diff.c:5821–5836  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5819}
5820
5821static enum parse_opt_result diff_opt_output(struct parse_opt_ctx_t *ctx,
5822 const struct option *opt,
5823 const char *arg, int unset)
5824{
5825 struct diff_options *options = opt->value;
5826 char *path;
5827
5828 BUG_ON_OPT_NEG(unset);
5829 path = prefix_filename(ctx->prefix, arg);
5830 options->file = xfopen(path, "w");
5831 options->close_file = 1;
5832 if (options->use_color != GIT_COLOR_ALWAYS)
5833 options->use_color = GIT_COLOR_NEVER;
5834 free(path);
5835 return 0;
5836}
5837
5838static int diff_opt_patience(const struct option *opt,
5839 const char *arg, int unset)

Callers

nothing calls this directly

Calls 2

prefix_filenameFunction · 0.85
xfopenFunction · 0.85

Tested by

no test coverage detected