Re: [PATCH] Add --show-size to git log to print message size

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Add --show-size to git log to print message size

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:23

I've been re-reviewing recent patches, and this is one of them.
However, I am wondering if this is an intended behaviour...

: git.git master; ./git-log --log-size --abbrev-commit --pretty=oneline \
  ko/master..master
9d468ac... log size 47
Add --log-size to git log to print message size
ca193cf... log size 40
git am: skip pine's internal folder data
d1cc130... log size 48
Teach git-commit about commit message templates.
af66366... log size 41
Teach approxidate() to understand "never"
7b69b87... log size 64
git log -g: Complain, but do not fail, when no reflogs are there
2d8ae40... log size 49
send-email: Update regex parsing for pine aliases
f836f1a... log size 40
cvsexportcommit: avoid racy CVS problem.
1843d8d... log size 53
cleanup unpack-trees.c: shrink struct tree_entry_list
24d0063... log size 56
filter-branch: fix dash complaining about "Missing '))'"
3473e7d... log size 56
gitweb: More detailed error messages for snapshot format
93c22ee... log size 47
git.el: Support for incremental status updates.

Re: [PATCH] Add --show-size to git log to print message size

From: Marco Costalba <hidden>
Date: 2016-06-15 22:43:23

On 7/25/07, Junio C Hamano [off-list ref] wrote:
I've been re-reviewing recent patches, and this is one of them.
Thanks for pushing to pu. Please tell me if you want me to send you a
patch to update to what we have discussed, specifically using "length
unknown" and changing the name to --show-lengths.
However, I am wondering if this is an intended behaviour...

: git.git master; ./git-log --log-size --abbrev-commit --pretty=oneline \
  ko/master..master
9d468ac... log size 47
Add --log-size to git log to print message size
ca193cf... log size 40
Well, the patch should be used to speedup the parsing by tools because
you can skip big part of the record and jump directly to the beginning
of the next one. So IMHO I don't see a lot of sense in using it
together with --pretty=oneline.

Anyway only default options should be guaranteed to behave correctly
with all the other options. In general, responsibility for what you
see on the screen it's on the tips of user's fingers. IMHO
responsibility of git is of not crashing and do not show incorrect
info, not that the info should be useful.

Paul, I don't know gitk and Tcl to being able to answer myself, but I
would like to know if this new option could be useful also for gitk.

This option, after the first line, gives the size of the following
part of the record. Does this allow you to delay the parsing of the
biggest part of the commit record?

Author name, date, log title, log message could be read only when it's
needed, so that after reading the first couple lines of a commit you
can point directly to the beginning of the next one skipping the rest.

Marco
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help