shortlog: optimize out useless string list
commit9b21a34a968080873519a927afd9c2570f464785
authorJeff King <peff@peff.net>
Mon, 18 Jan 2016 20:02:59 +0000 (18 15:02 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 Jan 2016 17:55:04 +0000 (19 09:55 -0800)
tree212fcc4f193939bcee99f8f38396813bc6a3d6f7
parented7eba902202be030aae28aba29fe7b294cbee5d
shortlog: optimize out useless string list

If we are in "--summary" mode, then we do not care about the
actual list of subject onelines associated with each author.
We care only about the number. So rather than store a
string-list for each author full of "<none>", let's just
keep a count.

This drops my best-of-five for "git shortlog -ns HEAD" on
linux.git from:

  real    0m5.194s
  user    0m5.028s
  sys     0m0.168s

to:

  real    0m5.057s
  user    0m4.916s
  sys     0m0.144s

That's about 2.5%.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/shortlog.c