Lines Matching +full:line +full:- +full:name
2 # SPDX-License-Identifier: GPL-2.0+
13 One problem is that the authors' name and/or email address is sometimes
16 (See 'man git-shortlog' for furthur information of this feature.)
21 names which share the same email address. The author name with the most
22 commits is asuumed to be a canonical real name. If the number of commits
23 from the cananonical name is equal to or greater than 'MIN_COMMITS',
24 the entry for the cananical name will be output. ('MIN_COMMITS' is used
38 -----
58 toplevel = subprocess.check_output(['git', 'rev-parse', '--show-toplevel'])
69 # First, create 'auther name' vs 'number of commits' database.
70 # We assume the name with the most commits as the canonical real name.
71 shortlog = subprocess.check_output(['git', 'shortlog', '-s', '-n'])
75 for line in shortlog.splitlines():
77 commits, name = line.split(None, 1)
79 # ignore lines with an empty author name
81 commits_per_name[name] = int(commits)
84 shortlog = subprocess.check_output(['git', 'shortlog', '-s', '-n', '-e'])
89 for line in shortlog.splitlines():
90 # tmp, mail = line.rsplit(None, 1) is not safe
92 tmp, mail = line.split('<')
95 _, name = tmp.rstrip().split(None, 1)
97 # author name is empty
98 name = '' variable
100 # another name for the same email address
102 # Take the name with more commits
103 major_name = sorted([prev_name, name],
109 mail_vs_name[mail] = name
142 for line in infile:
143 if line[0] == '#' or line[0] == '\n':
144 comment_block.append(line)
146 output_lines.append(line)
148 for line in infile:
149 output_lines.append(line)
152 for mail, name in output.items():
153 output_lines.append(name + ' ' + mail + '\n')