diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-07-15 10:28:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-07-15 10:28:40 -0700 |
commit | 22fcbc420e7948cadb42c923810609a5e4b730a4 (patch) | |
tree | 98af691dffb868dcce816e514e6fd81220ffdc7b /commit.h | |
parent | 9678ee7ba30a76b0b5c613126e659dcb1a206091 (diff) | |
parent | a90804752f6ab2b911882d47fafb6c2b78f447c3 (diff) | |
download | git-22fcbc420e7948cadb42c923810609a5e4b730a4.tar.gz |
Merge branch 'jk/format-patch-from'
"git format-patch" learned "--from[=whom]" option, which sets the
"From: " header to the specified person (or the person who runs the
command, if "=whom" part is missing) and move the original author
information to an in-body From: header as necessary.
* jk/format-patch-from:
teach format-patch to place other authors into in-body "From"
pretty.c: drop const-ness from pretty_print_context
Diffstat (limited to 'commit.h')
-rw-r--r-- | commit.h | 21 |
1 files changed, 17 insertions, 4 deletions
@@ -6,6 +6,7 @@ #include "strbuf.h" #include "decorate.h" #include "gpg-interface.h" +#include "string-list.h" struct commit_list { struct commit *item; @@ -79,6 +80,9 @@ enum cmit_fmt { }; struct pretty_print_context { + /* + * Callers should tweak these to change the behavior of pp_* functions. + */ enum cmit_fmt fmt; int abbrev; const char *subject; @@ -92,6 +96,15 @@ struct pretty_print_context { const char *output_encoding; struct string_list *mailmap; int color; + struct ident_split *from_ident; + + /* + * Fields below here are manipulated internally by pp_* functions and + * should not be counted on by callers. + */ + + /* Manipulated by the pp_* functions internally. */ + struct string_list in_body_headers; }; struct userformat_want { @@ -111,20 +124,20 @@ extern void userformat_find_requirements(const char *fmt, struct userformat_want extern void format_commit_message(const struct commit *commit, const char *format, struct strbuf *sb, const struct pretty_print_context *context); -extern void pretty_print_commit(const struct pretty_print_context *pp, +extern void pretty_print_commit(struct pretty_print_context *pp, const struct commit *commit, struct strbuf *sb); extern void pp_commit_easy(enum cmit_fmt fmt, const struct commit *commit, struct strbuf *sb); -void pp_user_info(const struct pretty_print_context *pp, +void pp_user_info(struct pretty_print_context *pp, const char *what, struct strbuf *sb, const char *line, const char *encoding); -void pp_title_line(const struct pretty_print_context *pp, +void pp_title_line(struct pretty_print_context *pp, const char **msg_p, struct strbuf *sb, const char *encoding, int need_8bit_cte); -void pp_remainder(const struct pretty_print_context *pp, +void pp_remainder(struct pretty_print_context *pp, const char **msg_p, struct strbuf *sb, int indent); |