| 3193 | } |
| 3194 | |
| 3195 | static 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())) |
no test coverage detected