aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-05-20 15:40:29 +0200
committerJunio C Hamano <junkio@cox.net>2006-05-21 02:03:09 -0700
commit698ce6f87e0d6db380f7306e190e8586da184577 (patch)
tree14171dae273827471bea4021a325b4d4a6c2c7d4 /diff.c
parent328b710d800dc3786fe2b8595e5553dc4a4af424 (diff)
downloadgit-698ce6f87e0d6db380f7306e190e8586da184577.tar.gz
git-698ce6f87e0d6db380f7306e190e8586da184577.tar.xz
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>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/diff.c b/diff.c
index af5db0ec1..be459cac6 100644
--- a/diff.c
+++ b/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];