浏览代码

Skip submodules when counting extensions and file sizes.

Heikki Hokkanen 14 年前
父节点
当前提交
8aebc9ce66
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3
    0
      gitstats

+ 3
- 0
gitstats 查看文件

@@ -410,6 +410,9 @@ class GitDataCollector(DataCollector):
410 410
 			if len(line) == 0:
411 411
 				continue
412 412
 			parts = re.split('\s+', line, 5)
413
+			if parts[0] == '160000' and parts[3] == '-':
414
+				# skip submodules
415
+				continue
413 416
 			sha1 = parts[2]
414 417
 			size = int(parts[3])
415 418
 			fullpath = parts[4]