From: Junio C Hamano Date: Fri, 5 Apr 2024 17:49:49 +0000 (-0700) Subject: Merge branch 'rs/config-comment' X-Git-Tag: v2.45.0-rc0~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3256584c36f649abb2af58e7b190d3cf674ba56e;p=thirdparty%2Fgit.git Merge branch 'rs/config-comment' "git config" learned "--comment=" option to leave a comment immediately after the "variable = value" on the same line in the configuration file. * rs/config-comment: config: allow tweaking whitespace between value and comment config: fix --comment formatting config: add --comment option to add a comment --- 3256584c36f649abb2af58e7b190d3cf674ba56e diff --cc sequencer.c index fa838f264f,8002b9a2ac..4ae1af060a --- a/sequencer.c +++ b/sequencer.c @@@ -3490,25 -3468,22 +3490,25 @@@ static int save_opts(struct replay_opt opts->edit ? "true" : "false"); if (opts->allow_empty) res |= git_config_set_in_file_gently(opts_file, - "options.allow-empty", "true"); + "options.allow-empty", NULL, "true"); if (opts->allow_empty_message) res |= git_config_set_in_file_gently(opts_file, - "options.allow-empty-message", "true"); + "options.allow-empty-message", NULL, "true"); + if (opts->drop_redundant_commits) + res |= git_config_set_in_file_gently(opts_file, - "options.drop-redundant-commits", "true"); ++ "options.drop-redundant-commits", NULL, "true"); if (opts->keep_redundant_commits) res |= git_config_set_in_file_gently(opts_file, - "options.keep-redundant-commits", "true"); + "options.keep-redundant-commits", NULL, "true"); if (opts->signoff) res |= git_config_set_in_file_gently(opts_file, - "options.signoff", "true"); + "options.signoff", NULL, "true"); if (opts->record_origin) res |= git_config_set_in_file_gently(opts_file, - "options.record-origin", "true"); + "options.record-origin", NULL, "true"); if (opts->allow_ff) res |= git_config_set_in_file_gently(opts_file, - "options.allow-ff", "true"); + "options.allow-ff", NULL, "true"); if (opts->mainline) { struct strbuf buf = STRBUF_INIT; strbuf_addf(&buf, "%d", opts->mainline);