fmt-patch: Support --attach
This patch touches a couple of files, because it adds options to print a custom text just after the subject of a commit, and just after the diffstat. [jc: made "many dashes" used as the boundary leader into a single variable, to reduce the possibility of later tweaks to miscount the number of dashes to break it.] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
committed by
Junio C Hamano
parent
328b710d80
commit
698ce6f87e
6
diff.c
6
diff.c
@ -299,6 +299,7 @@ static void diffstat_consume(void *priv, char *line, unsigned long len)
|
||||
|
||||
static const char pluses[] = "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++";
|
||||
static const char minuses[]= "----------------------------------------------------------------------";
|
||||
const char mime_boundary_leader[] = "------------";
|
||||
|
||||
static void show_stats(struct diffstat_t* data)
|
||||
{
|
||||
@ -1980,7 +1981,10 @@ void diff_flush(struct diff_options *options)
|
||||
show_stats(diffstat);
|
||||
free(diffstat);
|
||||
diffstat = NULL;
|
||||
putchar(options->line_termination);
|
||||
if (options->stat_sep)
|
||||
fputs(options->stat_sep, stdout);
|
||||
else
|
||||
putchar(options->line_termination);
|
||||
}
|
||||
for (i = 0; i < q->nr; i++) {
|
||||
struct diff_filepair *p = q->queue[i];
|
||||
|
||||
Reference in New Issue
Block a user