Subject: Re: Promoting Git developers

From: Jeff King <[email-masked]>
Date: Wed, 11 Mar 2015 03:54:29 -0400

On Wed, Mar 11, 2015 at 12:38:21AM -0700, Junio C Hamano wrote:

> >> I can add "shortlog --no-merges -s -n v2.3.0..v2.4.0" at the end of
> >> the e-mail when the release notes is sent out. That might be a good
> >> enough balance between the usefulness of the release notes to its
> >> customers and giving credits to individuals in a way a bit more
> >> visible than "if you are interested, run shortlog yourself" [*4*].
> >
> > I somehow thought you already did this, but it looks like you just do
> > shortlog (without the "-ns") for the "maint" release announcement.
> 
> That is because (a) it is scripted in Meta/Announce, and (b) I strip it
> out for feature releases, as the plain shortlog output with full feature
> list is usually ends up being just too long for the announce message.

Yeah, I figured the length was the reason.

> Perhaps I'll add "shortlog -s | pr -3" or something at the end for both
> maintenance track and feature releases. Names only, unordered and
> hopefully not overly long.

Yes, I was thinking something along those lines. Maybe:

  # example
  old=v2.2.0
  new=v2.3.0

  # like "shortlog -s", but we do not even care about the numbers
  shortlog () {
	git log --format=%aN "$@" | sort -u
  }

  compact () {
	perl -lne 'push @x, $_; END { print join(", ", @x) }' |
	fold -s
  }

  count () {
	shortlog $old..$new | wc -l
  }

  newbies () {
	comm -23 <(shortlog $old..$new) <(shortlog $old) | compact
  }

  oldtimers () {
	comm -12 <(shortlog $old..$new) <(shortlog $old) | compact
  }

  cat <<EOF
  Git $new was developed with commits from $(count) people. Thanks very
  much to our returning developers:

  $(oldtimers)

  and welcome to new contributors in this release:

  $(newbies)
  EOF

Or something along those lines. The wording and indentation of the
message could probably use tweaking. And there is a bash-ism in the
script. :)

-Peff