Explorar el Código

Fixed calculation of number of files.

Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
Kirill Chilikin hace 14 años
padre
commit
502b215425
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      gitstats

+ 1
- 1
gitstats Ver fichero

@@ -407,7 +407,6 @@ class GitDataCollector(DataCollector):
407 407
 		# extensions and size of files
408 408
 		lines = getpipeoutput(['git ls-tree -r -l -z %s' % getcommitrange('HEAD', end_only = True)]).split('\000')
409 409
 		self.total_size = 0
410
-		self.total_files += len(lines)
411 410
 		for line in lines:
412 411
 			if len(line) == 0:
413 412
 				continue
@@ -417,6 +416,7 @@ class GitDataCollector(DataCollector):
417 416
 			fullpath = parts[4]
418 417
 
419 418
 			self.total_size += size
419
+			self.total_files += 1
420 420
 
421 421
 			filename = fullpath.split('/')[-1] # strip directories
422 422
 			if filename.find('.') == -1 or filename.rfind('.') == 0: