Remote: make sure to take the contents of the id

Pass the contents of the buffer containing the git_oid to bytes() so
build a raw representation of its contents. Using bytes(ffi.buffer(...))
returns the representation of the buffer.
This commit is contained in:
Carlos Martín Nieto
2014-04-13 18:57:03 +02:00
parent d51174d34f
commit e56ab370a7

View File

@@ -334,8 +334,8 @@ class Remote(object):
try: try:
s = maybe_string(refname) s = maybe_string(refname)
a = Oid(raw=bytes(ffi.buffer(a))) a = Oid(raw=bytes(ffi.buffer(a)[:]))
b = Oid(raw=bytes(ffi.buffer(b))) b = Oid(raw=bytes(ffi.buffer(b)[:]))
self.update_tips(s, a, b) self.update_tips(s, a, b)
except Exception as e: except Exception as e: