+static enum commit_msg_cleanup_mode default_msg_cleanup =
+ COMMIT_MSG_CLEANUP_NONE;
+static char *default_gpg_sign;
+
+int git_sequencer_config(const char *k, const char *v, void *cb)
+{
+ if (!strcmp(k, "commit.cleanup")) {
+ int status;
+ const char *s;
+
+ status = git_config_string(&s, k, v);
+ if (status)
+ return status;
+
+ if (!strcmp(s, "verbatim"))
+ default_msg_cleanup = COMMIT_MSG_CLEANUP_NONE;
+ else if (!strcmp(s, "whitespace"))
+ default_msg_cleanup = COMMIT_MSG_CLEANUP_SPACE;
+ else if (!strcmp(s, "strip"))
+ default_msg_cleanup = COMMIT_MSG_CLEANUP_ALL;
+ else if (!strcmp(s, "scissors"))
+ default_msg_cleanup = COMMIT_MSG_CLEANUP_SPACE;
+
+ return status;
+ }
+
+ if (!strcmp(k, "commit.gpgsign")) {
+ default_gpg_sign = git_config_bool(k, v) ? "" : NULL;
+ return 0;
+ }
+
+ return git_gpg_config(k, v, NULL);
+}
+