summaryrefslogtreecommitdiff
path: root/git/index/typ.py
diff options
context:
space:
mode:
authorAntoine Musso <hashar@free.fr>2014-11-16 20:15:50 +0100
committerAntoine Musso <hashar@free.fr>2014-11-16 20:46:41 +0100
commitf5d11b750ecc982541d1f936488248f0b42d75d3 (patch)
tree8be522510315f5adc32c0c55acd45dc1074294da /git/index/typ.py
parent7aba59a2609ec768d5d495dafd23a4bce8179741 (diff)
downloadgitpython-f5d11b750ecc982541d1f936488248f0b42d75d3.tar.gz
pep8 linting (whitespaces)
W191 indentation contains tabs E221 multiple spaces before operator E222 multiple spaces after operator E225 missing whitespace around operator E271 multiple spaces after keyword W292 no newline at end of file W293 blank line contains whitespace W391 blank line at end of file
Diffstat (limited to 'git/index/typ.py')
-rw-r--r--git/index/typ.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/git/index/typ.py b/git/index/typ.py
index 7f27d869..97dff59e 100644
--- a/git/index/typ.py
+++ b/git/index/typ.py
@@ -56,7 +56,7 @@ class BaseIndexEntry(tuple):
def __str__(self):
return "%o %s %i\t%s" % (self.mode, self.hexsha, self.stage, self.path)
-
+
def __repr__(self):
return "(%o, %s, %i, %s)" % (self.mode, self.hexsha, self.stage, self.path)
@@ -69,7 +69,7 @@ class BaseIndexEntry(tuple):
def binsha(self):
"""binary sha of the blob """
return self[1]
-
+
@property
def hexsha(self):
"""hex version of our sha"""
@@ -78,12 +78,12 @@ class BaseIndexEntry(tuple):
@property
def stage(self):
"""Stage of the entry, either:
-
+
* 0 = default stage
* 1 = stage before a merge or common ancestor entry in case of a 3 way merge
* 2 = stage of entries from the 'left' side of the merge
* 3 = stage of entries from the right side of the merge
-
+
:note: For more information, see http://www.kernel.org/pub/software/scm/git/docs/git-read-tree.html
"""
return (self[2] & CE_STAGEMASK) >> CE_STAGESHIFT
@@ -102,7 +102,7 @@ class BaseIndexEntry(tuple):
def from_blob(cls, blob, stage = 0):
""":return: Fully equipped BaseIndexEntry at the given stage"""
return cls((blob.mode, blob.binsha, stage << CE_STAGESHIFT, blob.path))
-
+
def to_blob(self, repo):
""":return: Blob using the information of this index entry"""
return Blob(repo, self.binsha, self.mode, self.path)
@@ -152,7 +152,7 @@ class IndexEntry(BaseIndexEntry):
def size(self):
""":return: Uncompressed size of the blob """
return self[10]
-
+
@classmethod
def from_base(cls, base):
"""
@@ -169,5 +169,3 @@ class IndexEntry(BaseIndexEntry):
""":return: Minimal entry resembling the given blob object"""
time = pack(">LL", 0, 0)
return IndexEntry((blob.mode, blob.binsha, stage << CE_STAGESHIFT, blob.path, time, time, 0, 0, 0, 0, blob.size))
-
-