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

Function parse_strategy_opts

sequencer.c:3133–3154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3131}
3132
3133static void parse_strategy_opts(struct replay_opts *opts, char *raw_opts)
3134{
3135 int i;
3136 int count;
3137 const char **argv;
3138 char *strategy_opts_string = raw_opts;
3139
3140 if (*strategy_opts_string == ' ')
3141 strategy_opts_string++;
3142
3143 count = split_cmdline(strategy_opts_string, &argv);
3144 if (count < 0)
3145 BUG("could not split '%s': %s", strategy_opts_string,
3146 split_cmdline_strerror(count));
3147 for (i = 0; i < count; i++) {
3148 const char *arg = argv[i];
3149
3150 skip_prefix(arg, "--", &arg);
3151 strvec_push(&opts->xopts, arg);
3152 }
3153 free(argv);
3154}
3155
3156static void read_strategy_opts(struct replay_opts *opts, struct strbuf *buf)
3157{

Callers 1

read_strategy_optsFunction · 0.85

Calls 3

split_cmdlineFunction · 0.85
split_cmdline_strerrorFunction · 0.85
strvec_pushFunction · 0.85

Tested by

no test coverage detected