mirror of
https://github.com/git/git.git
synced 2024-11-24 10:26:17 +08: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:
parent
0e94f7aa73
commit
f59199d5fa
27
sequencer.c
27
sequencer.c
@ -2701,25 +2701,33 @@ 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++)
|
||||
@ -2728,7 +2736,8 @@ static int save_opts(struct replay_opts *opts)
|
||||
opts->xopts[i], "^$", 0);
|
||||
}
|
||||
if (opts->allow_rerere_auto)
|
||||
res |= git_config_set_in_file_gently(opts_file, "options.allow-rerere-auto",
|
||||
res |= git_config_set_in_file_gently(opts_file,
|
||||
"options.allow-rerere-auto",
|
||||
opts->allow_rerere_auto == RERERE_AUTOUPDATE ?
|
||||
"true" : "false");
|
||||
return res;
|
||||
|
Loading…
Reference in New Issue
Block a user