mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-11-16 00:28:25 +01:00
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:
parent
f74eb394b8
commit
879a7c5446
1 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue