1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-28 09:16:10 +02:00

sequencer: break some long lines

reformat save_opts() to remove excessively long lines.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Phillip Wood 2019-03-13 18:26:13 +00:00 committed by Junio C Hamano
parent 0e94f7aa73
commit f59199d5fa

View File

@ -2701,36 +2701,45 @@ static int save_opts(struct replay_opts *opts)
int res = 0;
if (opts->no_commit)
res |= git_config_set_in_file_gently(opts_file, "options.no-commit", "true");
res |= git_config_set_in_file_gently(opts_file,
"options.no-commit", "true");
if (opts->edit)
res |= git_config_set_in_file_gently(opts_file, "options.edit", "true");
res |= git_config_set_in_file_gently(opts_file,
"options.edit", "true");
if (opts->signoff)
res |= git_config_set_in_file_gently(opts_file, "options.signoff", "true");
res |= git_config_set_in_file_gently(opts_file,
"options.signoff", "true");
if (opts->record_origin)
res |= git_config_set_in_file_gently(opts_file, "options.record-origin", "true");
res |= git_config_set_in_file_gently(opts_file,
"options.record-origin", "true");
if (opts->allow_ff)
res |= git_config_set_in_file_gently(opts_file, "options.allow-ff", "true");
res |= git_config_set_in_file_gently(opts_file,
"options.allow-ff", "true");
if (opts->mainline) {
struct strbuf buf = STRBUF_INIT;
strbuf_addf(&buf, "%d", opts->mainline);
res |= git_config_set_in_file_gently(opts_file, "options.mainline", buf.buf);
res |= git_config_set_in_file_gently(opts_file,
"options.mainline", buf.buf);
strbuf_release(&buf);
}
if (opts->strategy)
res |= git_config_set_in_file_gently(opts_file, "options.strategy", opts->strategy);
res |= git_config_set_in_file_gently(opts_file,
"options.strategy", opts->strategy);
if (opts->gpg_sign)
res |= git_config_set_in_file_gently(opts_file, "options.gpg-sign", opts->gpg_sign);
res |= git_config_set_in_file_gently(opts_file,
"options.gpg-sign", opts->gpg_sign);
if (opts->xopts) {
int i;
for (i = 0; i < opts->xopts_nr; i++)
res |= git_config_set_multivar_in_file_gently(opts_file,
"options.strategy-option",
opts->xopts[i], "^$", 0);
"options.strategy-option",
opts->xopts[i], "^$", 0);
}
if (opts->allow_rerere_auto)
res |= git_config_set_in_file_gently(opts_file, "options.allow-rerere-auto",
opts->allow_rerere_auto == RERERE_AUTOUPDATE ?
"true" : "false");
res |= git_config_set_in_file_gently(opts_file,
"options.allow-rerere-auto",
opts->allow_rerere_auto == RERERE_AUTOUPDATE ?
"true" : "false");
return res;
}