summaryrefslogtreecommitdiff
path: root/contrib/contacts
Commit message (Collapse)AuthorAgeFilesLines
* contacts: add a Makefile to generate docs and installss/contrib-subtree-contactsSebastian Schuberth2014-10-152-0/+74
| | | | | | | Also add a gitignore file for generated files. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-contacts: do not fail parsing of good diffslb/contrib-contacts-looser-diff-parsingLars Gullik Bjønnes2014-02-181-2/+0
| | | | | | | | | | | | If a line in a patch starts with "--- " it will be deemed malformed unless it also contains the proper diff header format. This situation can happen with a valid patch if it has a line starting with "-- " and that line is removed. This patch just removes the check in git-contacts. Signed-off-by: Lars Gullik Bjønnes <larsbj@gullik.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* contacts: fix to work in subdirectorieses/contacts-in-subdirEric Sunshine2013-09-171-0/+4
| | | | | | | | | | | Unlike other git commands which work correctly at the top-level or in a subdirectory, git-contacts fails when invoked in a subdirectory. This is because it invokes git-blame with pathnames relative to the top-level, but git-blame interprets the pathnames as relative to the current directory. Fix this. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* contacts: reduce git-blame invocationses/contacts-blame-L-multiEric Sunshine2013-08-131-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | git-contacts invokes git-blame once for each patch hunk it encounters. No attempt is made to consolidate invocations for multiple hunks referencing the same file at the same revision. This can become expensive quickly. Reduce the number of git-blame invocations by taking advantage of the ability to specify multiple -L ranges for a single invocation. Without this patch, on a randomly chosen range of commits: % time git-contacts 25fba78d36be6297^..23c339c0f262aad2 >/dev/null real 0m6.142s user 0m5.429s sys 0m0.356s With this patch: % time git-contacts 25fba78d36be6297^..23c339c0f262aad2 >/dev/null real 0m2.285s user 0m2.093s sys 0m0.165s Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* contacts: gather all blame sources prior to invoking git-blameEric Sunshine2013-08-131-5/+20
| | | | | | | | | | | | | | | | git-contacts invokes git-blame immediately upon encountering a patch hunk. No attempt is made to consolidate invocations for multiple hunks referencing the same file at the same revision. This can become expensive quickly. Any effort to reduce the number of times git-blame is run will need to to know in advance which line ranges to blame per file per revision. Make this information available by collecting all sources as a distinct step from invoking git-blame. A subsequent patch will utilize the information to optimize git-blame invocations. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* contacts: validate hunk length earlierEric Sunshine2013-08-131-3/+2
| | | | | | | | | | | | | | | Rather than calling get_blame() with a zero-length hunk only to have it rejected immediately, perform hunk-length validation earlier in order to avoid calling get_blame() unnecessarily. This is a preparatory step to simplify later patches which reduce the number of git-blame invocations by collecting together all lines to blame within a single file at a particular revision. By validating the blame range early, the subsequent patch can more easily avoid adding empty ranges at collection time. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* contrib: contacts: add documentationes/contactsEric Sunshine2013-07-211-0/+94
| | | | | | | | | | Assuming that git-contacts may some day be promoted to a core git command, the documentation is written and formatted as if it already belongs in Documentation/ even though it presently resides in contrib/contacts. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* contrib: contacts: add mailmap supportEric Sunshine2013-07-211-0/+18
| | | | | | | | | | | | | The purpose of git-contacts is to determine a list of people who might have some interest in a patch or set of changes. It can be used as git-send-email's --cc-cmd argument or the computed list might be used to ask for comments on a proposed change. As such, it is important to report up-to-date email addresses in the computed list rather than potentially outdated ones recorded with commits. Apply git's mailmap functionality to the retrieved contacts in order to achieve this goal. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* contrib: contacts: interpret committish akin to format-patchEric Sunshine2013-07-211-1/+18
| | | | | | | | | | | | | As a convenience, accept the same style <since> committish as accepted by git-format-patch. For example: % git contacts origin will consider commits in the current branch built atop 'origin', just as "git format-patch origin" will format commits built atop 'origin'. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* contrib: contacts: add ability to parse from committishEric Sunshine2013-07-211-6/+32
| | | | | | | | | | | | | For example: % git contacts R1..R2 Committishes and patch files can be mentioned in the same invocation: % git contacts R1..R2 extra/*.patch Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* contrib: add git-contacts helperEric Sunshine2013-07-211-0/+127
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>