diff options
author | Marco Costalba <mcostalba@gmail.com> | 2007-07-20 20:15:13 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-08-14 01:59:33 -0700 |
commit | 9fa3465d6be83c08ed24762c82eb33cb005729f3 (patch) | |
tree | 04e80313bc65786cd64042d4f25326fe444cf3bd /log-tree.c | |
parent | git-diff: squelch "empty" diffs (diff) | |
download | tgif-9fa3465d6be83c08ed24762c82eb33cb005729f3.tar.xz |
Add --log-size to git log to print message size
With this option git-log prints log message size
just before the corresponding message.
Porcelain tools could use this to speedup parsing
of git-log output.
Note that size refers to log message only. If also
patch content is shown its size is not included.
In case it is not possible to know the size upfront
size value is set to zero.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'log-tree.c')
-rw-r--r-- | log-tree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/log-tree.c b/log-tree.c index 8624d5a39c..a6423718e7 100644 --- a/log-tree.c +++ b/log-tree.c @@ -295,6 +295,9 @@ void show_log(struct rev_info *opt, const char *sep) if (opt->add_signoff) len = append_signoff(&msgbuf, &msgbuf_len, len, opt->add_signoff); + if (opt->show_log_size) + printf("log size %i\n", len); + printf("%s%s%s", msgbuf, extra, sep); free(msgbuf); } |