contrib: add git-contacts helper
commit4d06402b1b29259bd475e5473c4478f58e9376a1
authorEric Sunshine <sunshine@sunshineco.com>
Sun, 21 Jul 2013 10:52:38 +0000 (21 06:52 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sun, 21 Jul 2013 22:12:30 +0000 (21 15:12 -0700)
tree9dc0d271f43f5652bf0b42d24314138572d6daad
parentcb5c9521f1e41aa536c2cf64d689e647d035bb90
contrib: add git-contacts helper

This script lists people that might be interested in a patch by going
back through the history for each patch hunk, and finding people that
reviewed, acknowledged, signed, authored, or were Cc:'d on the code the
patch is modifying.

It does this by running git-blame incrementally on each hunk and then
parsing the commit message. After gathering all participants, it
determines each person's relevance by considering how many commits
mentioned that person compared with the total number of commits under
consideration. The final output consists only of participants who pass a
minimum threshold of participation.

Several conditions controlling a person's significance are currently
hard-coded, such as minimum participation level, blame date-limiting,
and -C level for detecting moved and copied lines. In the future, these
conditions may become configurable.

For example:

  % git contacts 0001-remote-hg-trivial-cleanups.patch
  Felipe Contreras <felipe.contreras@gmail.com>
  Jeff King <peff@peff.net>
  Max Horn <max@quendi.de>
  Junio C Hamano <gitster@pobox.com>

Thus, it can be invoked as git-send-email's --cc-cmd option, among other
possible uses.

This is a Perl rewrite of Felipe Contreras' git-related patch series[1]
written in Ruby.

[1]: http://thread.gmane.org/gmane.comp.version-control.git/226065/

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/contacts/git-contacts [new file with mode: 0755]