浏览代码

Removed useless merge_authors configuration option. Use .mailmap instead.

Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
Jani Hur 11 年前
父节点
当前提交
a5a9b09f39
共有 1 个文件被更改,包括 0 次插入12 次删除
  1. 0
    12
      gitstats

+ 0
- 12
gitstats 查看文件

46
 	'commit_end': 'HEAD',
46
 	'commit_end': 'HEAD',
47
 	'linear_linestats': 1,
47
 	'linear_linestats': 1,
48
 	'project_name': '',
48
 	'project_name': '',
49
-	'merge_authors': {},
50
 	'processes': 8,
49
 	'processes': 8,
51
 	'start_date': ''
50
 	'start_date': ''
52
 }
51
 }
323
 				parts = re.split('\s+', line, 2)
322
 				parts = re.split('\s+', line, 2)
324
 				commits = int(parts[1])
323
 				commits = int(parts[1])
325
 				author = parts[2]
324
 				author = parts[2]
326
-				if author in conf['merge_authors']:
327
-					author = conf['merge_authors'][author]
328
 				self.tags[tag]['commits'] += commits
325
 				self.tags[tag]['commits'] += commits
329
 				self.tags[tag]['authors'][author] = commits
326
 				self.tags[tag]['authors'][author] = commits
330
 
327
 
341
 			timezone = parts[3]
338
 			timezone = parts[3]
342
 			author, mail = parts[4].split('<', 1)
339
 			author, mail = parts[4].split('<', 1)
343
 			author = author.rstrip()
340
 			author = author.rstrip()
344
-			if author in conf['merge_authors']:
345
-				author = conf['merge_authors'][author]
346
 			mail = mail.rstrip('>')
341
 			mail = mail.rstrip('>')
347
 			domain = '?'
342
 			domain = '?'
348
 			if mail.find('@') != -1:
343
 			if mail.find('@') != -1:
555
 				if pos != -1:
550
 				if pos != -1:
556
 					try:
551
 					try:
557
 						(stamp, author) = (int(line[:pos]), line[pos+1:])
552
 						(stamp, author) = (int(line[:pos]), line[pos+1:])
558
-						if author in conf['merge_authors']:
559
-							author = conf['merge_authors'][author]
560
 						self.changes_by_date[stamp] = { 'files': files, 'ins': inserted, 'del': deleted, 'lines': total_lines }
553
 						self.changes_by_date[stamp] = { 'files': files, 'ins': inserted, 'del': deleted, 'lines': total_lines }
561
 
554
 
562
 						date = datetime.datetime.fromtimestamp(stamp)
555
 						date = datetime.datetime.fromtimestamp(stamp)
613
 					try:
606
 					try:
614
 						oldstamp = stamp
607
 						oldstamp = stamp
615
 						(stamp, author) = (int(line[:pos]), line[pos+1:])
608
 						(stamp, author) = (int(line[:pos]), line[pos+1:])
616
-						if author in conf['merge_authors']:
617
-							author = conf['merge_authors'][author]
618
 						if oldstamp > stamp:
609
 						if oldstamp > stamp:
619
 							# clock skew, keep old timestamp to avoid having ugly graph
610
 							# clock skew, keep old timestamp to avoid having ugly graph
620
 							stamp = oldstamp
611
 							stamp = oldstamp
1432
 					raise KeyError('no such key "%s" in config' % key)
1423
 					raise KeyError('no such key "%s" in config' % key)
1433
 				if isinstance(conf[key], int):
1424
 				if isinstance(conf[key], int):
1434
 					conf[key] = int(value)
1425
 					conf[key] = int(value)
1435
-				elif isinstance(conf[key], dict):
1436
-					kk,vv = value.split(',', 1)
1437
-					conf[key][kk] = vv
1438
 				else:
1426
 				else:
1439
 					conf[key] = value
1427
 					conf[key] = value
1440
 			elif o in ('-h', '--help'):
1428
 			elif o in ('-h', '--help'):