summaryrefslogtreecommitdiff
path: root/lib/git/index/typ.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-06-25 23:58:24 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-06-25 23:58:24 +0200
commit47e3138ee978ce708a41f38a0d874376d7ae5c78 (patch)
tree0880f5c8f2a375e718c69fcffd15e87b7f4aecae /lib/git/index/typ.py
parent58fb1187b7b8f1e62d3930bdba9be5aba47a52c6 (diff)
downloadgitpython-47e3138ee978ce708a41f38a0d874376d7ae5c78.tar.gz
Adjusted all files to (hopefully) deal with the fact that all objects now use 20 byte sha's internally as it is closer to the GitDB implementation
Switched all remaining files back to tabs Adjusted all remaining docstrings to suit the sphinx doc convention - its likely that there are many of docstring syntax errors though
Diffstat (limited to 'lib/git/index/typ.py')
-rw-r--r--lib/git/index/typ.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/git/index/typ.py b/lib/git/index/typ.py
index d9cafa2e..7654b402 100644
--- a/lib/git/index/typ.py
+++ b/lib/git/index/typ.py
@@ -7,7 +7,6 @@ from util import (
from binascii import (
b2a_hex,
- a2b_hex
)
__all__ = ('BlobFilter', 'BaseIndexEntry', 'IndexEntry')
@@ -101,7 +100,7 @@ class BaseIndexEntry(tuple):
@classmethod
def from_blob(cls, blob, stage = 0):
""":return: Fully equipped BaseIndexEntry at the given stage"""
- return cls((blob.mode, a2b_hex(blob.sha), stage << CE_STAGESHIFT, blob.path))
+ return cls((blob.mode, blob.binsha, stage << CE_STAGESHIFT, blob.path))
class IndexEntry(BaseIndexEntry):
@@ -164,6 +163,6 @@ class IndexEntry(BaseIndexEntry):
def from_blob(cls, blob, stage = 0):
""":return: Minimal entry resembling the given blob object"""
time = pack(">LL", 0, 0)
- return IndexEntry((blob.mode, a2b_hex(blob.sha), stage << CE_STAGESHIFT, blob.path, time, time, 0, 0, 0, 0, blob.size))
+ return IndexEntry((blob.mode, blob.binsha, stage << CE_STAGESHIFT, blob.path, time, time, 0, 0, 0, 0, blob.size))