diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-06-28 19:16:23 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-06-28 19:16:23 +0200 |
commit | 8d2239f24f6a54d98201413d4f46256df0d6a5f3 (patch) | |
tree | cd3685e0bd87441eab4888efbc4e14a232a65a7b /lib/git/index/typ.py | |
parent | 58fb1187b7b8f1e62d3930bdba9be5aba47a52c6 (diff) | |
parent | 1fe889ea0cb2547584075dc1eb77f52c54b9a8c4 (diff) | |
download | gitpython-8d2239f24f6a54d98201413d4f46256df0d6a5f3.tar.gz |
Merge branch 'sha20'
Diffstat (limited to 'lib/git/index/typ.py')
-rw-r--r-- | lib/git/index/typ.py | 5 |
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)) |