summaryrefslogtreecommitdiff
path: root/lib/git/diff.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-11 21:17:59 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-11 21:17:59 +0200
commit708b8dda8e7b87841a5f39c60b799c514e75a9c7 (patch)
tree0726d95c0ad6270278c6695381522e8a5f8a2b76 /lib/git/diff.py
parentccde80b7a3037a004a7807a6b79916ce2a1e9729 (diff)
downloadgitpython-708b8dda8e7b87841a5f39c60b799c514e75a9c7.tar.gz
commit: fixed failing commit tests as the mocked git command would always return the same thing which does not work anymore - re-implemented it in a more dynamic manner, but in the end tests will have to be revised anyway
Added slots to Diff and Stats type respectively
Diffstat (limited to 'lib/git/diff.py')
-rw-r--r--lib/git/diff.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/git/diff.py b/lib/git/diff.py
index ef58cb0e..7200b7e3 100644
--- a/lib/git/diff.py
+++ b/lib/git/diff.py
@@ -45,12 +45,12 @@ class Diff(object):
\.\.(?P<b_blob_id>[0-9A-Fa-f]+)[ ]?(?P<b_mode>.+)?(?:\n|$))?
""", re.VERBOSE | re.MULTILINE)
re_is_null_hexsha = re.compile( r'^0{40}$' )
+ __slots__ = ("a_blob", "b_blob", "a_mode", "b_mode", "new_file", "deleted_file",
+ "rename_from", "rename_to", "renamed", "diff")
def __init__(self, repo, a_path, b_path, a_blob_id, b_blob_id, a_mode,
b_mode, new_file, deleted_file, rename_from,
rename_to, diff):
- self.repo = repo
-
if not a_blob_id or self.re_is_null_hexsha.search(a_blob_id):
self.a_blob = None
else: