Commit 95a83a7de5d3ce84206b9267962c32df4d071c21

  • Tree SHA1: 8d4b8b1
  • Parent SHA1: 990d1fe (fixed http://groups.google.com/group/git-python/browse_thread/thread/b8f3580abf31f9db?hl=en# and passed Git a working_tree again (sort of).)
  • raw diff | raw patch
fixed http://groups.google.com/group/git-python/browse_thread/thread/62b972d2345c74c2?hl=en# and added lines to the per file stats
  
88 def list_from_string(cls, repo, text):
99 hsh = {'total': {'insertions': 0, 'deletions': 0, 'lines': 0, 'files': 0}, 'files': {}}
1010 for line in text.splitlines():
11 (insertions, deletions, filename) = line.split("\t")
12 hsh['total']['insertions'] += insertions != '-' and int(insertions) or 0
13 hsh['total']['deletions'] += deleteions != '-' and int(deletions) or 0
14 hsh['total']['lines'] = (hsh['total']['deletions'] + hsh['total']['insertions'])
11 (raw_insertions, raw_deletions, filename) = line.split("\t")
12 insertions = raw_insertions != '-' and int(raw_insertions) or 0
13 deletions = raw_deletions != '-' and int(raw_deletions) or 0
14 hsh['total']['insertions'] += insertions
15 hsh['total']['deletions'] += deletions
16 hsh['total']['lines'] = insertions + deletions
1517 hsh['total']['files'] += 1
16 hsh['files'][filename.strip()] = {'insertions': int(insertions), 'deletions': int(deletions)}
18 hsh['files'][filename.strip()] = {'insertions': insertions,
19 'deletions': deletions,
20 'lines': insertions + deletions}
1721 return Stats(repo, hsh['total'], hsh['files'])