Re: [PATCH RFC v3 01/18] sequencer: optionally skip printing commit summary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Patrick

On 04/09/2025 15:27, Patrick Steinhardt wrote:

diff --git a/sequencer.c b/sequencer.c
index aaf2e4df64..7066cdc939 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1742,7 +1742,7 @@ static int do_commit(struct repository *r,
  			refs_delete_ref(get_main_ref_store(r), "",
  					"CHERRY_PICK_HEAD", NULL, REF_NO_DEREF);
  			unlink(git_path_merge_msg(r));
-			if (!is_rebase_i(opts))
+			if (!is_rebase_i(opts) && !opts->skip_commit_summary)

I think it would be cleaner to make rebase set the new option and remove !is_rebase_i(opts) here.

Thanks

Phillip

  				print_commit_summary(r, NULL, &oid,
  						SUMMARY_SHOW_AUTHOR_DATE);
  			return res;
@@ -3139,8 +3139,12 @@ static int populate_opts_cb(const char *key, const char *value,
  	else if (!strcmp(key, "options.default-msg-cleanup")) {
  		opts->explicit_cleanup = 1;
  		opts->default_msg_cleanup = get_cleanup_mode(value, 1);
-	} else
+	} else if (!strcmp(key, "options.skip-commit-summary")) {
+		opts->skip_commit_summary =
+			git_config_bool_or_int(key, value, ctx->kvi, &error_flag);
+	} else {
  		return error(_("invalid key: %s"), key);
+	}
if (!error_flag)
  		return error(_("invalid value for '%s': '%s'"), key, value);
@@ -3698,11 +3702,13 @@ static int save_opts(struct replay_opts *opts)
  				"options.allow-rerere-auto", NULL,
  				opts->allow_rerere_auto == RERERE_AUTOUPDATE ?
  				"true" : "false");
-
  	if (opts->explicit_cleanup)
  		res |= repo_config_set_in_file_gently(the_repository, opts_file,
  				"options.default-msg-cleanup", NULL,
  				describe_cleanup_mode(opts->default_msg_cleanup));
+	if (opts->skip_commit_summary)
+		res |= repo_config_set_in_file_gently(the_repository, opts_file,
+					"options.skip-commit-summary", NULL, "true");
  	return res;
  }
diff --git a/sequencer.h b/sequencer.h
index 304ba4b4d3..1767fd737e 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -52,6 +52,7 @@ struct replay_opts {
  	int keep_redundant_commits;
  	int verbose;
  	int quiet;
+	int skip_commit_summary;
  	int reschedule_failed_exec;
  	int committer_date_is_author_date;
  	int ignore_date;






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux