Skip to content

Commit

Permalink
git-format-patch: add a new format.cc configuration variable
Browse files Browse the repository at this point in the history
Some projects prefer to always CC patches to a given mailing list. In
these cases, it's handy to configure that address once.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Miklos Vajna authored and Junio C Hamano committed Apr 30, 2008
1 parent f0ec47b commit fe8928e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Documentation/git-format-patch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ and file suffix, and number patches when outputting more than one.
subjectprefix = CHANGE
suffix = .txt
numbered = auto
cc = <email>
------------


Expand Down
7 changes: 7 additions & 0 deletions builtin-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,13 @@ static int git_format_config(const char *var, const char *value)
fmt_patch_suffix = xstrdup(value);
return 0;
}
if (!strcmp(var, "format.cc")) {
if (!value)
return config_error_nonbool(var);
ALLOC_GROW(extra_cc, extra_cc_nr + 1, extra_cc_alloc);
extra_cc[extra_cc_nr++] = xstrdup(value);
return 0;
}
if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff")) {
return 0;
}
Expand Down

0 comments on commit fe8928e

Please sign in to comment.