summaryrefslogtreecommitdiff
path: root/advice.c
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2016-01-18 15:02:56 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-01-19 09:55:03 -0800
commited7eba902202be030aae28aba29fe7b294cbee5d (patch)
tree21f5d203d78a6ba514a995257a50f60cade7d8c6 /advice.c
parentshortlog: optimize "--summary" mode (diff)
downloadtgif-ed7eba902202be030aae28aba29fe7b294cbee5d.tar.xz
shortlog: optimize out useless "<none>" normalization
If we are in --summary mode, we will always pass <none> to insert_one_record, which will then do some normalization (e.g., cutting out "[PATCH]"). There's no point in doing so if we aren't going to use the result anyway. This drops my best-of-five for "git shortlog -ns HEAD" on linux.git from: real 0m5.257s user 0m5.104s sys 0m0.156s to: real 0m5.194s user 0m5.028s sys 0m0.168s That's only 1%, but arguably the result is clearer to read, as we're able to group our variable declarations inside the conditional block. It also opens up further optimization possibilities for future patches. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'advice.c')
0 files changed, 0 insertions, 0 deletions