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

Function read_populate_opts

sequencer.c:3195–3299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3193}
3194
3195static int read_populate_opts(struct replay_opts *opts)
3196{
3197 struct replay_ctx *ctx = opts->ctx;
3198
3199 if (is_rebase_i(opts)) {
3200 struct strbuf buf = STRBUF_INIT;
3201 int ret = 0;
3202
3203 if (read_oneliner(&buf, rebase_path_gpg_sign_opt(),
3204 READ_ONELINER_SKIP_IF_EMPTY)) {
3205 if (!starts_with(buf.buf, "-S"))
3206 strbuf_reset(&buf);
3207 else {
3208 free(opts->gpg_sign);
3209 opts->gpg_sign = xstrdup(buf.buf + 2);
3210 }
3211 strbuf_reset(&buf);
3212 }
3213
3214 if (read_oneliner(&buf, rebase_path_allow_rerere_autoupdate(),
3215 READ_ONELINER_SKIP_IF_EMPTY)) {
3216 if (!strcmp(buf.buf, "--rerere-autoupdate"))
3217 opts->allow_rerere_auto = RERERE_AUTOUPDATE;
3218 else if (!strcmp(buf.buf, "--no-rerere-autoupdate"))
3219 opts->allow_rerere_auto = RERERE_NOAUTOUPDATE;
3220 strbuf_reset(&buf);
3221 }
3222
3223 if (file_exists(rebase_path_verbose()))
3224 opts->verbose = 1;
3225
3226 if (file_exists(rebase_path_quiet()))
3227 opts->quiet = 1;
3228
3229 if (file_exists(rebase_path_signoff())) {
3230 opts->allow_ff = 0;
3231 opts->signoff = 1;
3232 }
3233
3234 if (file_exists(rebase_path_cdate_is_adate())) {
3235 opts->allow_ff = 0;
3236 opts->committer_date_is_author_date = 1;
3237 }
3238
3239 if (file_exists(rebase_path_ignore_date())) {
3240 opts->allow_ff = 0;
3241 opts->ignore_date = 1;
3242 }
3243
3244 if (file_exists(rebase_path_reschedule_failed_exec()))
3245 opts->reschedule_failed_exec = 1;
3246 else if (file_exists(rebase_path_no_reschedule_failed_exec()))
3247 opts->reschedule_failed_exec = 0;
3248
3249 if (file_exists(rebase_path_drop_redundant_commits()))
3250 opts->drop_redundant_commits = 1;
3251
3252 if (file_exists(rebase_path_keep_redundant_commits()))

Callers 1

sequencer_continueFunction · 0.85

Calls 11

is_rebase_iFunction · 0.85
read_onelinerFunction · 0.85
starts_withFunction · 0.85
xstrdupFunction · 0.85
file_existsFunction · 0.85
read_strategy_optsFunction · 0.85
read_trailersFunction · 0.85
repo_get_oid_committishFunction · 0.85
errorFunction · 0.85
strbuf_releaseFunction · 0.85
git_config_from_fileFunction · 0.85

Tested by

no test coverage detected