projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pretty_print_commit: add different formats
[git.git]
/
diff-tree.c
diff --git
a/diff-tree.c
b/diff-tree.c
index
3881c23
..
6f8dc20
100644
(file)
--- a/
diff-tree.c
+++ b/
diff-tree.c
@@
-19,6
+19,7
@@
static int diff_break_opt = -1;
static const char *orderfile = NULL;
static const char *header = NULL;
static const char *header_prefix = "";
static const char *orderfile = NULL;
static const char *header = NULL;
static const char *header_prefix = "";
+static enum cmit_fmt commit_format = CMIT_FMT_RAW;
// What paths are we interested in?
static int nr_paths = 0;
// What paths are we interested in?
static int nr_paths = 0;
@@
-321,7
+322,7
@@
static char *generate_header(const char *commit, const char *parent, const char
offset = sprintf(this_header, "%s%s (from %s)\n", header_prefix, commit, parent);
if (verbose_header) {
offset = sprintf(this_header, "%s%s (from %s)\n", header_prefix, commit, parent);
if (verbose_header) {
- offset += pretty_print_commit(msg, len, this_header + offset, sizeof(this_header) - offset);
+ offset += pretty_print_commit(
commit_format,
msg, len, this_header + offset, sizeof(this_header) - offset);
this_header[offset++] = '\n';
this_header[offset++] = 0;
}
this_header[offset++] = '\n';
this_header[offset++] = 0;
}