()
| 60 | |
| 61 | |
| 62 | def check_duplicates(): |
| 63 | text = subprocess.check_output(['git', 'shortlog', '--summary', '--email']) |
| 64 | lines = text.decode('utf8').split('\n') |
| 65 | contributors = [line.split('\t', 1)[1].strip() for line in lines if line] |
| 66 | emails = [re.match('.*<(.*)>', line).group(1) for line in contributors] |
| 67 | email_counter = Counter(emails) |
| 68 | |
| 69 | if email_counter.most_common(1)[0][1] > 1: |
| 70 | print('DUPLICATE CHECK: The following email addresses are used with ' |
| 71 | 'more than one name.\nConsider adding them to .mailmap.\n') |
| 72 | for email, count in email_counter.items(): |
| 73 | if count > 1: |
| 74 | print('{}\n{}'.format( |
| 75 | email, '\n'.join(l for l in lines if email in l))) |
| 76 | |
| 77 | |
| 78 | def generate_credits(): |
no test coverage detected
searching dependent graphs…