summaryrefslogtreecommitdiff
path: root/lib/git/index.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-11-03 16:35:33 +0100
committerSebastian Thiel <byronimo@gmail.com>2009-11-03 16:35:33 +0100
commit3cb5ba18ab1a875ef6b62c65342de476be47871b (patch)
treed287a2fad9f87856b6937ffd4abaed66c9066da7 /lib/git/index.py
parentdbc18b92362f60afc05d4ddadd6e73902ae27ec7 (diff)
downloadgitpython-3cb5ba18ab1a875ef6b62c65342de476be47871b.tar.gz
object: renamed id attribute to sha as it in fact is always being rewritten as sha, even if the passed in id was a ref. This is done to assure objects are uniquely identified and will compare correctly
Diffstat (limited to 'lib/git/index.py')
-rw-r--r--lib/git/index.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/git/index.py b/lib/git/index.py
index cc3f3a4e..705b1ae7 100644
--- a/lib/git/index.py
+++ b/lib/git/index.py
@@ -92,7 +92,7 @@ class BaseIndexEntry(tuple):
Returns
Fully equipped BaseIndexEntry at the given stage
"""
- return cls((blob.mode, blob.id, stage, blob.path))
+ return cls((blob.mode, blob.sha, stage, blob.path))
class IndexEntry(BaseIndexEntry):
@@ -165,7 +165,7 @@ class IndexEntry(BaseIndexEntry):
Minimal entry resembling the given blob objecft
"""
time = struct.pack(">LL", 0, 0)
- return IndexEntry((blob.mode, blob.id, 0, blob.path, time, time, 0, 0, 0, 0, blob.size))
+ return IndexEntry((blob.mode, blob.sha, 0, blob.path, time, time, 0, 0, 0, 0, blob.size))
def clear_cache(func):