static const char *signature_file;
static int config_cover_letter;
static const char *config_output_directory;
+static int show_notes;
+static struct display_notes_opt notes_opt;
enum {
COVER_UNSET,
static int git_format_config(const char *var, const char *value, void *cb)
{
- struct rev_info *rev = cb;
-
if (!strcmp(var, "format.headers")) {
if (!value)
die(_("format.headers without value"));
}
if (!strcmp(var, "format.notes")) {
int b = git_parse_maybe_bool(value);
- rev->show_notes = set_display_notes(&rev->notes_opt, b, b < 0 ? value : NULL);
+ show_notes = set_display_notes(¬es_opt, b, b < 0 ? value : NULL);
return 0;
}
extra_to.strdup_strings = 1;
extra_cc.strdup_strings = 1;
init_log_defaults();
+ init_display_notes(¬es_opt);
+ git_config(git_format_config, NULL);
repo_init_revisions(the_repository, &rev, prefix);
- git_config(git_format_config, &rev);
+ rev.show_notes = show_notes;
+ memcpy(&rev.notes_opt, ¬es_opt, sizeof(notes_opt));
rev.commit_format = CMIT_FMT_EMAIL;
rev.expand_tabs_in_log_default = 0;
rev.verbose_header = 1;