git
[Ported from github.com/git/git] Sync with Git 2.56.1
Brought by drakestapleton
git / contrib / contacts / git-contacts.adoc
| 1 | git-contacts(1) |
| 2 | =============== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | git-contacts - List people who might be interested in a set of changes |
| 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
| 11 | [verse] |
| 12 | 'git contacts' (<patch>|'-'|<range>|<rev>)... |
| 13 | |
| 14 | |
| 15 | DESCRIPTION |
| 16 | ----------- |
| 17 | |
| 18 | Given a set of changes, specified as patch files or revisions, determine people |
| 19 | who might be interested in those changes. This is done by consulting the |
| 20 | history of each patch or revision hunk to find people mentioned by commits |
| 21 | which touched the lines of files under consideration. |
| 22 | |
| 23 | Input consists of one or more patch files or revision arguments. A revision |
| 24 | argument can be a range or a single `<rev>` which is interpreted as |
| 25 | `<rev>..HEAD`, thus the same revision arguments are accepted as for |
| 26 | linkgit:git-format-patch[1]. A single dash `'-'` character in place of a |
| 27 | `<patch>` tells the command to read patch file(s) from the standard input. |
| 28 | Patch files, standard input, and revision arguments can be combined in the same |
| 29 | invocation. |
| 30 | |
| 31 | This command can be useful for determining the list of people with whom to |
| 32 | discuss proposed changes, or for finding the list of recipients to Cc: when |
| 33 | submitting a patch series via `git send-email`. For the latter case, `git |
| 34 | contacts` can be used as the argument to `git send-email`'s `--cc-cmd` option. |
| 35 | |
| 36 | |
| 37 | DISCUSSION |
| 38 | ---------- |
| 39 | |
| 40 | `git blame` is invoked for each hunk in a patch file or revision. For each |
| 41 | commit mentioned by `git blame`, the commit message is consulted for people who |
| 42 | authored, reviewed, signed, acknowledged, or were Cc:'d. Once the list of |
| 43 | participants is known, each person's relevance is computed by considering how |
| 44 | many commits mentioned that person compared with the total number of commits |
| 45 | under consideration. The final output consists only of participants who exceed |
| 46 | a minimum threshold of participation. |
| 47 | |
| 48 | |
| 49 | OUTPUT |
| 50 | ------ |
| 51 | |
| 52 | For each person of interest, a single line is output, terminated by a newline. |
| 53 | If the person's name is known, ``Name $$<user@host>$$'' is printed; otherwise |
| 54 | only ``$$<user@host>$$'' is printed. |
| 55 | |
| 56 | |
| 57 | EXAMPLES |
| 58 | -------- |
| 59 | |
| 60 | * Consult patch files: |
| 61 | + |
| 62 | ------------ |
| 63 | $ git contacts feature/*.patch |
| 64 | ------------ |
| 65 | |
| 66 | * Revision range: |
| 67 | + |
| 68 | ------------ |
| 69 | $ git contacts R1..R2 |
| 70 | ------------ |
| 71 | |
| 72 | * From a single revision to `HEAD`: |
| 73 | + |
| 74 | ------------ |
| 75 | $ git contacts origin |
| 76 | ------------ |
| 77 | |
| 78 | * Input a patch via stdin: |
| 79 | + |
| 80 | ------------ |
| 81 | $ git contacts - <feature.patch |
| 82 | ------------ |
| 83 | |
| 84 | * Helper for `git send-email`: |
| 85 | + |
| 86 | ------------ |
| 87 | $ git send-email --cc-cmd='git contacts' feature/*.patch |
| 88 | ------------ |
| 89 | |
| 90 | |
| 91 | LIMITATIONS |
| 92 | ----------- |
| 93 | |
| 94 | Several conditions controlling a person's significance are currently |
| 95 | hard-coded, such as minimum participation level (10%), blame date-limiting (5 |
| 96 | years), and `-C` level for detecting moved and copied lines (a single `-C`). In |
| 97 | the future, these conditions may become configurable. |
| 98 | |
| 99 | |
| 100 | GIT |
| 101 | --- |
| 102 | Part of the linkgit:git[1] suite |