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