Removed the storage of commit message in the Commit class.

As we don't really need it, storing this was just eating up unnecessary
memory. On very big repositories (with many commits) removing it makes a
big difference.
This commit is contained in:
Adam Waldenberg 2013-05-20 19:07:35 +02:00
parent f74eb394b8
commit 879a7c5446

View file

@ -66,11 +66,10 @@ class Commit:
self.filediffs = []
commit_line = string.split("|")
if commit_line.__len__() == 4:
if commit_line.__len__() == 3:
self.date = commit_line[0]
self.sha = commit_line[1]
self.author = commit_line[2].strip()
self.message = commit_line[3].strip()
def add_filediff(self, filediff):
self.filediffs.append(filediff)
@ -80,7 +79,7 @@ class Commit:
@staticmethod
def is_commit_line(string):
return string.split("|").__len__() == 4
return string.split("|").__len__() == 3
class AuthorInfo:
insertions = 0
@ -90,7 +89,7 @@ class AuthorInfo:
class Changes:
def __init__(self, hard):
self.commits = []
git_log_r = subprocess.Popen("git log --pretty=\"%cd|%H|%aN|%s\" --stat=100000,8192 --no-merges -w " +
git_log_r = subprocess.Popen("git log --pretty=\"%cd|%H|%aN\" --stat=100000,8192 --no-merges -w " +
interval.get_since() + interval.get_until() +
"{0} --date=short".format("-C -C -M" if hard else ""),
shell=True, bufsize=1, stdout=subprocess.PIPE).stdout