From 6917ae4ce9eaa0f5ea91592988c1ea830626ac3a Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 29 Jun 2010 12:10:56 +0200 Subject: Diff: fixed bug that caused a string to end up as a blob mode --- lib/git/objects/base.py | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/git/objects/base.py') diff --git a/lib/git/objects/base.py b/lib/git/objects/base.py index 118bc3ca..97b7898c 100644 --- a/lib/git/objects/base.py +++ b/lib/git/objects/base.py @@ -36,6 +36,7 @@ class Object(LazyMixin): super(Object,self).__init__() self.repo = repo self.binsha = binsha + assert len(binsha) == 20, "Require 20 byte binary sha, got %r, len = %i" % (binsha, len(binsha)) @classmethod def new(cls, repo, id): -- cgit v1.2.1